Index: openacs-4/packages/acs-core-docs/www/xml/kernel/db-api.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/kernel/db-api.xml,v diff -u -N -r1.11 -r1.12 --- openacs-4/packages/acs-core-docs/www/xml/kernel/db-api.xml 27 Oct 2014 16:39:31 -0000 1.11 +++ openacs-4/packages/acs-core-docs/www/xml/kernel/db-api.xml 7 Aug 2017 23:47:55 -0000 1.12 @@ -60,9 +60,9 @@ } db_transaction { -db_dml unused "insert into greeble(bork) values(33)" -foo $db -db_dml unused "insert into greeble(bork) values(50)" + db_dml unused {insert into greeble(bork) values(33)} + foo $db + db_dml unused {insert into greeble(bork) values(50)} } @@ -507,7 +507,7 @@ set bar "" set baz "" -db_dml foo_create "insert into foo(bar, baz) values(:bar, :baz)" +db_dml foo_create {insert into foo(bar, baz) values(:bar, :baz)} # # the values of the "bar" and "baz" columns in the new row are both # null, because Oracle has coerced the empty string (even for the @@ -536,7 +536,7 @@ set bar [db_null] set baz [db_null] -db_dml foo_create "insert into foo(bar, baz) values(:bar, :baz)" +db_dml foo_create {insert into foo(bar, baz) values(:bar, :baz)} # # sets the values for both the "bar" and "baz" columns to null @@ -835,11 +835,11 @@ -db_dml insert_photos " +db_dml insert_photos { insert photos(photo_id, image, thumbnail_image) values(photo_id_seq.nextval, empty_blob(), empty_blob()) returning image, thumbnail_image into :1, :2 - " -blob_files [list "/var/tmp/the_photo" "/var/tmp/the_thumbnail"] + } -blob_files [list "/var/tmp/the_photo" "/var/tmp/the_thumbnail"] @@ -870,7 +870,7 @@ db_blob_get_file statement-name sql [ -bind bind_set_id | -bind bind_value_list ] -Analagous to ns_ora write_clob/write_blob/blob_get_file. +Analogous to ns_ora write_clob/write_blob/blob_get_file. @@ -913,8 +913,8 @@ proc replace_the_foo { col } { db_transaction { - db_dml "delete from foo" - db_dml "insert into foo(col) values($col)" + db_dml delete {delete from foo} + db_dml insert {insert into foo(col) values($col)} } } @@ -928,7 +928,7 @@ db_transaction { replace_the_foo 14 print_the_foo ; # Writes out "foo is 14" - db_dml "insert into some_other_table(col) values(999)" + db_dml insert_foo {insert into some_other_table(col) values(999)} ... db_abort_transaction } on_error { @@ -953,7 +953,7 @@ Aborts all levels of a transaction. That is if this is called within -several nested transactions, all of them are terminated. Use this insetead of +several nested transactions, all of them are terminated. Use this instead of db_dml "abort" "abort transaction". @@ -983,13 +983,13 @@ Each row also has a column, rownum, automatically added and set to the row number, starting with 1. Note that this will - override any column in the SQL statement named 'rownum', also if you're + override any column in the SQL statement named 'rownum', also if you're using the Oracle rownum pseudo-column. If the -local is passed, the variables defined - by db_multirow will be set locally (useful if you're compiling dynamic templates + by db_multirow will be set locally (useful if you're compiling dynamic templates in a function or similar situations). @@ -1011,7 +1011,7 @@ - If you're constructing your multirow through multiple queries with the + If you're constructing your multirow through multiple queries with the same set of columns, but with different rows, you can use the -append switch. This causes the rows returned by this query to be appended to the rows already in the multirow, instead of starting @@ -1175,7 +1175,7 @@ Returns 1 if db_type_list contains the current RDMBS type. A package - intended to run with a given RDBMS must note this in it's package info + intended to run with a given RDBMS must note this in it's package info file regardless of whether or not it actually uses the database.