]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Update the documentation for the new transaction method on the TCL interface. (CVS...
authordrh <drh@noemail.net>
Tue, 2 Aug 2005 17:38:19 +0000 (17:38 +0000)
committerdrh <drh@noemail.net>
Tue, 2 Aug 2005 17:38:19 +0000 (17:38 +0000)
FossilOrigin-Name: 3dc823a0ac12f640a3c54fe1eb7be878d2738529

manifest
manifest.uuid
www/tclsqlite.tcl

index 93085bfe5005ca0e4bf9f463e1c7cfc6ff9ae7db..bee6c9787f98b8378740e0809bb79ee0ace5aa33 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Tests\sand\sbug\sfixes\son\sthe\snew\stransaction\smethod\sin\sthe\sTCL\sinterface.\s(CVS\s2574)
-D 2005-08-02T17:15:15
+C Update\sthe\sdocumentation\sfor\sthe\snew\stransaction\smethod\son\sthe\sTCL\sinterface.\s(CVS\s2575)
+D 2005-08-02T17:38:19
 F Makefile.in 22ea9c0fe748f591712d8fe3c6d972c6c173a165
 F Makefile.linux-gcc 06be33b2a9ad4f005a5f42b22c4a19dab3cbb5c7
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -286,11 +286,11 @@ F www/quickstart.tcl 6f6f694b6139be2d967b1492eb9a6bdf7058aa60
 F www/speed.tcl 656ed5be8cc9d536353e1a96927b925634a62933
 F www/sqlite.tcl b51fd15f0531a54874de785a9efba323eecd5975
 F www/support.tcl 3955da0fd82be68cc5c83d347c05095e80967051
-F www/tclsqlite.tcl 425be741b8ae664f55cb1ef2371aab0a75109cf9
+F www/tclsqlite.tcl 3df553505b6efcad08f91e9b975deb2e6c9bb955
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
 F www/whentouse.tcl 528299b8316726dbcc5548e9aa0648c8b1bd055b
-P 3af69a49289f52f321ccd365e92d22b820c3139e
-R e54f832fc40dee5878f5ae1e6fa3f4c7
+P 68dd0ed5e312ecd5e98ee0fa1c21b70ff330f711
+R c779077438fd96a7272a0d01820472a0
 U drh
-Z 2343b82c522f82173d0ffa2bed3924c1
+Z 0387ea2fe83c9838d106b4554dcce416
index 4a7951c3a14604ce2809ae4e121fdb2c38f12864..662e02175c2759379a8d644ea9a89fd4df24d950 100644 (file)
@@ -1 +1 @@
-68dd0ed5e312ecd5e98ee0fa1c21b70ff330f711
\ No newline at end of file
+3dc823a0ac12f640a3c54fe1eb7be878d2738529
\ No newline at end of file
index 8bb6d7978f0e8b95add381121ab032b44d430986..5d67c87cc4529c5726e7618f9a297b9f8e758572 100644 (file)
@@ -1,7 +1,7 @@
 #
 # 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
 header {The Tcl interface to the SQLite library}
 proc METHOD {name text} {
@@ -72,6 +72,7 @@ foreach m [lsort {
  timeout
  total_changes
  trace
+ transaction
 }] {
  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>&nbsp;&nbsp;<b>transaction</b>&nbsp;&nbsp;<i>?transaction-type?</i>
+&nbsp;&nbsp;<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 {