nstcl  >  Documentation  >  nstcl-database  >  db_transaction

Tcl Powered!

db_transaction

NAME

db_transaction — Execute database statements within a transaction

SYNOPSIS

package require nstcl-database ?1.0?
package require nstcl ?1.0?

::nstcl::db_transaction code ?on_error on_error_code?

DESCRIPTION

db_transaction evalutates code inside of a database transaction. An optional on_error_code can be specified which is evaluated each time there is an error. The on_error_code may choose to let the transaction continue by calling db_continue_transaction. If the transaction is not explicitly continued (or if there is no on_error_code specified) then the transaction is aborted, and the database is rolled back to the state it was before the transaction began.

KEYWORDS

database, nstcl