mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Update the documentation for the new transaction method on the TCL interface. (CVS 2575)
FossilOrigin-Name: 3dc823a0ac12f640a3c54fe1eb7be878d2738529
This commit is contained in:
12
manifest
12
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Tests\sand\sbug\sfixes\son\sthe\snew\stransaction\smethod\sin\sthe\sTCL\sinterface.\s(CVS\s2574)
|
C Update\sthe\sdocumentation\sfor\sthe\snew\stransaction\smethod\son\sthe\sTCL\sinterface.\s(CVS\s2575)
|
||||||
D 2005-08-02T17:15:15
|
D 2005-08-02T17:38:19
|
||||||
F Makefile.in 22ea9c0fe748f591712d8fe3c6d972c6c173a165
|
F Makefile.in 22ea9c0fe748f591712d8fe3c6d972c6c173a165
|
||||||
F Makefile.linux-gcc 06be33b2a9ad4f005a5f42b22c4a19dab3cbb5c7
|
F Makefile.linux-gcc 06be33b2a9ad4f005a5f42b22c4a19dab3cbb5c7
|
||||||
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
||||||
@@ -286,11 +286,11 @@ F www/quickstart.tcl 6f6f694b6139be2d967b1492eb9a6bdf7058aa60
|
|||||||
F www/speed.tcl 656ed5be8cc9d536353e1a96927b925634a62933
|
F www/speed.tcl 656ed5be8cc9d536353e1a96927b925634a62933
|
||||||
F www/sqlite.tcl b51fd15f0531a54874de785a9efba323eecd5975
|
F www/sqlite.tcl b51fd15f0531a54874de785a9efba323eecd5975
|
||||||
F www/support.tcl 3955da0fd82be68cc5c83d347c05095e80967051
|
F www/support.tcl 3955da0fd82be68cc5c83d347c05095e80967051
|
||||||
F www/tclsqlite.tcl 425be741b8ae664f55cb1ef2371aab0a75109cf9
|
F www/tclsqlite.tcl 3df553505b6efcad08f91e9b975deb2e6c9bb955
|
||||||
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
||||||
F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
|
F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
|
||||||
F www/whentouse.tcl 528299b8316726dbcc5548e9aa0648c8b1bd055b
|
F www/whentouse.tcl 528299b8316726dbcc5548e9aa0648c8b1bd055b
|
||||||
P 3af69a49289f52f321ccd365e92d22b820c3139e
|
P 68dd0ed5e312ecd5e98ee0fa1c21b70ff330f711
|
||||||
R e54f832fc40dee5878f5ae1e6fa3f4c7
|
R c779077438fd96a7272a0d01820472a0
|
||||||
U drh
|
U drh
|
||||||
Z 2343b82c522f82173d0ffa2bed3924c1
|
Z 0387ea2fe83c9838d106b4554dcce416
|
||||||
|
@@ -1 +1 @@
|
|||||||
68dd0ed5e312ecd5e98ee0fa1c21b70ff330f711
|
3dc823a0ac12f640a3c54fe1eb7be878d2738529
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Run this Tcl script to generate the tclsqlite.html file.
|
# Run this Tcl script to generate the tclsqlite.html file.
|
||||||
#
|
#
|
||||||
set rcsid {$Id: tclsqlite.tcl,v 1.13 2005/04/03 23:54:45 danielk1977 Exp $}
|
set rcsid {$Id: tclsqlite.tcl,v 1.14 2005/08/02 17:38:19 drh Exp $}
|
||||||
source common.tcl
|
source common.tcl
|
||||||
header {The Tcl interface to the SQLite library}
|
header {The Tcl interface to the SQLite library}
|
||||||
proc METHOD {name text} {
|
proc METHOD {name text} {
|
||||||
@@ -72,6 +72,7 @@ foreach m [lsort {
|
|||||||
timeout
|
timeout
|
||||||
total_changes
|
total_changes
|
||||||
trace
|
trace
|
||||||
|
transaction
|
||||||
}] {
|
}] {
|
||||||
puts "<li><a href=\"#$m\">$m</a></li>"
|
puts "<li><a href=\"#$m\">$m</a></li>"
|
||||||
}
|
}
|
||||||
@@ -230,6 +231,44 @@ since it avoids making a copy of the content of $bigblob.
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
METHOD transaction {
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The "transaction" method is used to execute a TCL script inside an SQLite
|
||||||
|
database transaction. The transaction is committed when the script completes,
|
||||||
|
or it rolls back if the script fails. If the transaction occurs within
|
||||||
|
another transaction (even one that is started manually using BEGIN) it
|
||||||
|
is a no-op.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The transaction command can be used to group together several SQLite
|
||||||
|
commands in a safe way. You can always start transactions manually using
|
||||||
|
BEGIN, of
|
||||||
|
course. But if an error occurs so that the COMMIT or ROLLBACK are never
|
||||||
|
run, then the database will remain locked indefinitely. Also, BEGIN
|
||||||
|
does not nest, so you have to make sure no other transactions are active
|
||||||
|
before starting a new one. The "transaction" method takes care of
|
||||||
|
all of these details automatically.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The syntax looks like this:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<blockquote>
|
||||||
|
<i>dbcmd</i> <b>transaction</b> <i>?transaction-type?</i>
|
||||||
|
<i>SCRIPT,</i>
|
||||||
|
</blockquote>
|
||||||
|
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The <i>transaction-type</i> can be one of <b>deferred</b>,
|
||||||
|
<b>exclusive</b> or <b>immediate</b>. The default is deferred.
|
||||||
|
</p>
|
||||||
|
}
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
METHOD complete {
|
METHOD complete {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user