xo::db::DB-postgresql instproc 0or1row (public)

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

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

Run a query that returns at most one row. Set caller variables from the columns if a row is present.

Switches:
-dbn (optional)
Database name, or empty for the default.
-bind (optional)
Query bind values.
-prepare (optional)
Optional prepared-statement argument types.
Parameters:
qn (required)
Query name.
sql (required)
SQL statement.
Returns:
1 if a row was found, or 0 otherwise.

Testcases:
test_xo_db_object, test_cr_items, xowiki_test_cases
[ show source ]
Show another procedure: