xo::db::DB-postgresql instproc get_value (public)

 <instance of xo::db::DB-postgresql[i]> get_value [ -dbn dbn ] \
    [ -bind bind ] [ -prepare prepare ] qn sql [ default ]

Defined in /var/www/openacs/packages/xotcl-core/tcl/05-db-procs.tcl

Return the first column of a single-row query, or the default if there is no row.

Switches:
-dbn (optional)
Database name, or empty for the default.
-bind (optional)
Bind values for the query.
-prepare (optional)
Optional argument types for a prepared statement.
Parameters:
qn (required)
Query name.
sql (required)
SQL statement.
default (optional)
Value to return when the query produces no rows.

Testcases:
xotcl_core_tutorial_1, xotcl_core_tutorial_2, xotcl_core_tutorial_4, test_xo_db_object, test_cr_items, test_prepared_statements, xowiki_test_cases, path_resolve
[ show source ]
Show another procedure: