Index: openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl,v diff -u -r1.19.2.4 -r1.19.2.5 --- openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 6 Mar 2003 17:37:07 -0000 1.19.2.4 +++ openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 23 May 2003 13:11:29 -0000 1.19.2.5 @@ -7,7 +7,7 @@ @cvs-id $Id$ } -proc_doc db_type { } { +ad_proc db_type { } { Returns the RDBMS type (i.e. oracle, postgresql) this OpenACS installation is using. The nsv ad_database_type is set up during the bootstrap process. } { @@ -51,20 +51,20 @@ return 0 } -proc_doc db_version { } { +ad_proc db_version { } { Returns the RDBMS version (i.e. 8.1.6 is a recent Oracle version; 7.1 a recent PostgreSQL version. } { return [nsv_get ad_database_version .] } -proc_doc db_current_rdbms { } { +ad_proc db_current_rdbms { } { Returns the current rdbms type and version. } { return [db_rdbms_create [db_type] [db_version]] } -proc_doc db_known_database_types { } { +ad_proc db_known_database_types { } { Returns a list of three-element lists describing the database engines known to OpenACS. Each sublist contains the internal database name (used in file paths, etc), the driver name, and a "pretty name" to be used in selection @@ -76,7 +76,7 @@ return [nsv_get ad_known_database_types .] } -proc_doc db_null { } { +ad_proc db_null { } { Returns an empty string, which Oracle thinks is null. This routine was invented to provide an RDBMS-specific null value but doesn't actually work. I (DRB) left it in to speed porting - we should really clean up @@ -85,12 +85,12 @@ return "" } -proc_doc db_quote { string } { Quotes a string value to be placed in a SQL statement. } { +ad_proc db_quote { string } { Quotes a string value to be placed in a SQL statement. } { regsub -all {'} "$string" {''} result return $result } -proc_doc db_nth_pool_name { n } { +ad_proc db_nth_pool_name { n } { Returns the name of the pool used for the nth-nested selection (0-relative). } { set available_pools [nsv_get db_available_pools .] @@ -102,7 +102,7 @@ return $pool } -proc_doc db_with_handle { db code_block } { +ad_proc db_with_handle { db code_block } { Places a usable database handle in $db and executes $code_block. @@ -168,7 +168,7 @@ } } -proc_doc db_release_unused_handles {} { +ad_proc db_release_unused_handles {} { Releases any database handles that are presently unused. @@ -214,7 +214,7 @@ return -code $errno -errorinfo $errorInfo -errorcode $errorCode $error } -proc_doc db_string { statement_name sql args } { +ad_proc db_string { statement_name sql args } { Usage: db_string statement-name sql [ -default default ] [ -bind bind_set_id | -bind bind_value_list ]

Returns the first column of the result of the SQL query $sql. @@ -239,7 +239,7 @@ return [ns_set value $selection 0] } -proc_doc db_list { statement_name sql args } { +ad_proc db_list { statement_name sql args } { Usage: db_list statement-name sql [ -bind bind_set_id | -bind bind_value_list ]

Returns a Tcl list of the values in the first column of the result of SQL query sql. @@ -262,7 +262,7 @@ return $result } -proc_doc db_list_of_lists { statement_name sql args } { +ad_proc db_list_of_lists { statement_name sql args } { Usage: db_list_of_lists statement-name sql [ -bind bind_set_id | -bind bind_value_list ]

Returns a Tcl list, each element of which is a list of all column @@ -325,7 +325,7 @@ return $result } -proc_doc db_foreach { statement_name sql args } { +ad_proc db_foreach { statement_name sql args } { Usage:

db_foreach statement-name sql [ -bind bind_set_id | -bind bind_value_list ] \