xo::db::DB-postgresql instproc row_lock (public)
<instance of xo::db::DB-postgresql> row_lock [ -dbn dbn ] \ [ -bind bind ] [ -for for ] [ -prepare prepare ] qn sql
Defined in /var/www/openacs/packages/xotcl-core/tcl/05-db-procs.tcl
Append a locking clause to a query and return the first column of each row.
- Switches:
- -dbn (optional)
- Database name, or empty for the default.
- -bind (optional)
- Query bind values.
- -for (optional, defaults to
"UPDATE")- Locking clause after FOR, defaulting to UPDATE.
- -prepare (optional)
- Optional prepared-statement argument types.
- Parameters:
- qn (required)
- Query name.
- sql (required)
- SQL statement.
- Testcases:
- xotcl_core_tutorial_4, test_cr_items
Source code: set prepareOpt [expr {[info exists prepare] ? [list -prepare $prepare] : ""}] :uplevel [list ::xo::dc list -dbn $dbn -bind $bind {*}$prepareOpt $qn "$sql FOR $for"]XQL Not present: Generic, PostgreSQL, Oracle
![[i]](/resources/acs-subsite/ZoomIn16.gif)