Class ::acs::db::Driver (public)
::nx::Class ::acs::db::Driver
Defined in packages/acs-tcl/tcl/acs-db-00-procs.tcl
Abstract class of the database interface
- Testcases:
- No testcase defined.
Source code: :property backend :property driver :property {dbn ""} # # Define the "abstract" API (here via protected methods) # :method sets {{-dbn ""} {-bind ""} -prepare qn sql} {} :method 0or1row {{-dbn ""} {-bind ""} -prepare qn sql} {} :method 1row {{-dbn ""} {-bind ""} -prepare qn sql} {} :method get_value {{-dbn ""} {-bind ""} -prepare qn sql {default ""}} {} :method list_of_lists {{-dbn ""} {-bind ""} -prepare qn sql} {} :method list {{-dbn ""} {-bind ""} -prepare qn sql} {} :method dml {{-dbn ""} {-bind ""} -prepare qn sql} {} :method foreach {{-dbn ""} {-bind ""} -prepare qn sql {script}} {} :method row_lock {{-dbn ""} {-bind ""} {-for "UPDATE"} -prepare qn sql} {} :method transaction {{-dbn ""} script args} {} :method ds {onOff} {} :method prepare {-handle {-argtypes ""} sql} {} :public method qn {query_name} { # # Return fully qualified query name as used in OpenACS. # set prefix [expr {[info level] < 2 ? "topLevel" : [:uplevel {info level 0}]}] return "dbqd.$prefix.$query_name" } :method get_sql {{-dbn ""} qn} { set full_statement_name [db_qd_get_fullname $qn 2] set full_query [db_qd_fetch $full_statement_name $dbn] set sql [db_fullquery_get_querytext $full_query] # # todo: missing handling of substitution rules as # introduced with oacs-5-10 # :uplevel 2 [list subst $sql] } :method map_default_dbn {dbn} { return [expr {$dbn eq "" && ${:dbn} ne "" ? ${:dbn} : $dbn}] }XQL Not present: Generic, PostgreSQL, Oracle