From: drh Date: Tue, 2 Aug 2005 17:38:19 +0000 (+0000) Subject: Update the documentation for the new transaction method on the TCL interface. (CVS... X-Git-Tag: version-3.6.10~3584 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=586e4b2f30a6eaaef366f3fea407d497a07bbc97;p=thirdparty%2Fsqlite.git Update the documentation for the new transaction method on the TCL interface. (CVS 2575) FossilOrigin-Name: 3dc823a0ac12f640a3c54fe1eb7be878d2738529 --- diff --git a/manifest b/manifest index 93085bfe50..bee6c9787f 100644 --- 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 diff --git a/manifest.uuid b/manifest.uuid index 4a7951c3a1..662e02175c 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -68dd0ed5e312ecd5e98ee0fa1c21b70ff330f711 \ No newline at end of file +3dc823a0ac12f640a3c54fe1eb7be878d2738529 \ No newline at end of file diff --git a/www/tclsqlite.tcl b/www/tclsqlite.tcl index 8bb6d7978f..5d67c87cc4 100644 --- a/www/tclsqlite.tcl +++ b/www/tclsqlite.tcl @@ -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 "
  • $m
  • " } @@ -230,6 +231,44 @@ since it avoids making a copy of the content of $bigblob. } +############################################################################## +METHOD transaction { + +

    +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. +

    + +

    +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. +

    + +

    +The syntax looks like this: +

    + +
    +dbcmd  transaction  ?transaction-type? +  SCRIPT, +
    + + +

    +The transaction-type can be one of deferred, +exclusive or immediate. The default is deferred. +

    +} + ############################################################################## METHOD complete {