START-TRANSACTION — Open a transaction block.
Function
databaseA database object. This will default to the value of *default-database*.
Starts a transaction block on
database which defaults to
*default-database* and which continues until
rollback or commit are
called.
(in-transaction-p)
=> NIL
(select [*] :from [foo] :field-names nil)
=> NIL
(start-transaction)
=> NIL
(in-transaction-p)
=> T
(insert-records :into [foo] :av-pairs '(([bar] 1) ([baz] "one")))
=>
(select [*] :from [foo] :field-names nil)
=> ((1 "one"))
(rollback)
=> NIL
(in-transaction-p)
=> NIL
(select [*] :from [foo] :field-names nil)
=> NIL
Autocommit mode is disabled and if
database is currently within the scope
of a transaction, all commit and rollback hooks are removed
and the transaction level associated with
database is modified.