| Publicity: |
|---|
| [Public Only | All] |
An API for managing database queries.
- Location:
- packages/acs-tcl/tcl/00-database-procs.tcl
- Created:
- 15 Apr 2000
- Author:
- Jon Salz <jsalz@arsdigita.com>
- CVS Identification:
$Id: 00-database-procs.tcl,v 1.78 2009/02/12 15:38:41 jeffd Exp $
ad_column_type (public)ad_column_type [ -dbn dbn ] table_name column_name
|
db_0or1row (public)db_0or1row [ -dbn dbn ] [ -cache_key cache_key ] \
[ -cache_pool cache_pool ] statement_name sql [ args... ]
Usage:db_0or1row statement-name sql [ -bind bind_set_id | -bind bind_value_list ] [ -column_array array_name | -column_set set_name ] |
db_1row (public)db_1row [ args... ] Usage:db_1row statement-name sql [ -bind bind_set_id | -bind bind_value_list ] [ -column_array array_name | -column_set set_name ] |
db_abort_transaction (public)db_abort_transaction [ -dbn dbn ] Aborts all levels of a transaction. That is if this is called within several nested transactions, all of them are terminated. Use this instead of db_dml "abort" "abort transaction". |
db_blob_get (public)db_blob_get [ -dbn dbn ] statement_name sql [ args... ] PostgreSQL only. |
db_blob_get_file (public)db_blob_get_file [ -dbn dbn ] statement_name sql [ args... ]
|
db_boolean (public)db_boolean bool Converts a Tcl boolean (1/0) into a SQL boolean (t/f) |
db_bounce_pools (public)db_bounce_pools [ -dbn dbn ]
|
db_column_exists (public)db_column_exists [ -dbn dbn ] table_name column_name
|
db_column_type (public)db_column_type [ -dbn dbn ] table_name column_name
|
db_columns (public)db_columns [ -dbn dbn ] table_name
|
db_compatible_rdbms_p (public)db_compatible_rdbms_p db_type
|
db_current_rdbms (public)db_current_rdbms
|
db_dml (public)db_dml [ -dbn dbn ] statement_name sql [ args... ] Do a DML statement. |
db_exec_plsql (public)db_exec_plsql [ -dbn dbn ] statement_name sql [ args... ] Oracle: Executes a PL/SQL statement, and returns the variable of bind variable |
db_flush_cache (public)db_flush_cache [ -cache_key_pattern cache_key_pattern ] \
[ -cache_pool cache_pool ]
Flush the given cache of entries with keys that match the given pattern. |
db_foreach (public)db_foreach [ -dbn dbn ] statement_name sql [ args... ] Usage:db_foreach statement-name sql [ -bind bind_set_id | -bind bind_value_list ] [ -column_array array_name | -column_set set_name ] code_block [ if_no_rows if_no_rows_block ] |
db_get_database (public)db_get_database [ -dbn dbn ] PostgreSQL only. |
db_get_dbhost (public)db_get_dbhost [ -dbn dbn ] PostgreSQL only. |
db_get_password (public)db_get_password [ -dbn dbn ]
|
db_get_pgbin (public)db_get_pgbin [ -dbn dbn ] PostgreSQL only. |
db_get_port (public)db_get_port [ -dbn dbn ] PostgreSQL only. |
db_get_sql_user (public)db_get_sql_user [ -dbn dbn ] Oracle only. |
db_get_username (public)db_get_username [ -dbn dbn ]
|
db_known_database_types (public)db_known_database_types
|
db_list (public)db_list [ -dbn dbn ] [ -cache_key cache_key ] \
[ -cache_pool cache_pool ] statement_name sql [ args... ]
Usage: db_list statement-name sql [ -bind bind_set_id | -bind bind_value_list ] |
db_list_of_lists (public)db_list_of_lists [ -dbn dbn ] [ -cache_key cache_key ] \
[ -cache_pool cache_pool ] statement_name sql [ args... ]
Usage: db_list_of_lists statement-name sql [ -bind bind_set_id | -bind bind_value_list ] |
db_list_of_ns_sets (public)db_list_of_ns_sets [ -dbn dbn ] statement_name sql [ args... ] Usage: db_list_of_ns_sets statement-name sql [ -bind bind_set_id | -bind bind_value_list ] |
db_load_sql_data (public)db_load_sql_data [ -dbn dbn ] [ -callback callback ] file Loads a CSV formatted file into a table using PostgreSQL's COPY command or Oracle's SQL*Loader utility. The file name format consists of a sequence number used to control the order in which tables are loaded, and the table name with "-" replacing "_". This is a bit of a kludge but greatly speeds the loading of large amounts of data, such as is done when various "ref-*" packages are installed. |
db_multirow (public)db_multirow [ -local ] [ -append ] [ -upvar_level upvar_level ] \
[ -unclobber ] [ -extend extend ] [ -dbn dbn ] \
[ -cache_key cache_key ] [ -cache_pool cache_pool ] var_name \
statement_name sql [ args... ]
|
db_multirow_group_last_row_p (public)db_multirow_group_last_row_p -column column Used inside the code_block to db_multirow to ask whether this row is the last row before the value of 'column' changes, or the last row of the result set. |
db_name (public)db_name [ -dbn dbn ]
|
db_nextval (public)db_nextval [ -dbn dbn ] sequence Example: |
db_nth_pool_name (public)db_nth_pool_name [ -dbn dbn ] n
|
db_null (public)db_null
|
db_nullify_empty_string (public)db_nullify_empty_string string A convenience function that returns [db_null] if $string is the empty string. |
db_package_supports_rdbms_p (public)db_package_supports_rdbms_p db_type_list Deprecated. |
db_quote (public)db_quote string Quotes a string value to be placed in a SQL statement. |
db_release_unused_handles (public)db_release_unused_handles [ -dbn dbn ] Releases any database handles that are presently unused. |
db_resultrows (public)db_resultrows [ -dbn dbn ]
|
db_source_sql_file (public)db_source_sql_file [ -dbn dbn ] [ -callback callback ] file Sources a SQL file into Oracle (SQL*Plus format file) or PostgreSQL (psql format file). |
db_source_sqlj_file (public)db_source_sqlj_file [ -dbn dbn ] [ -callback callback ] file Oracle only. |
db_string (public)db_string [ -dbn dbn ] [ -cache_key cache_key ] \
[ -cache_pool cache_pool ] statement_name sql [ args... ]
Usage: db_string statement-name sql [ -default default ] [ -bind bind_set_id | -bind bind_value_list ] |
db_table_exists (public)db_table_exists [ -dbn dbn ] table_name
|
db_tables (public)db_tables [ -pattern pattern ] [ -dbn dbn ]
|
db_transaction (public)db_transaction [ -dbn dbn ] transaction_code [ args... ] Usage: db_transaction transaction_code [ on_error { error_code_block } ] Executes transaction_code with transactional semantics. This means that either all of the database commands within transaction_code are committed to the database or none of them are. Multiple |
db_type (public)db_type
|
db_version (public)db_version
|
db_with_handle (public)db_with_handle [ -dbn dbn ] db code_block Places a usable database handle in db and executes code_block. |
db_write_blob (public)db_write_blob [ -dbn dbn ] statement_name sql [ args... ]
|
db_write_clob (public)db_write_clob [ -dbn dbn ] statement_name sql [ args... ]
|