mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Update the TCL binding documentation to describe the newly added ability
to specify TCL variable names in the body of an SQL statement. (CVS 1904) FossilOrigin-Name: b3b9e58103dd6c65c55caf9a25bc1c257b37df88
This commit is contained in:
12
manifest
12
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Protect\sTcl_Obj\spointers\sfrom\schange\susing\sTcl_IncrRefCount()\swhile\nexecuting\sSQL\sstatements\sin\sthe\sTCL\sbindings.\s(CVS\s1903)
|
C Update\sthe\sTCL\sbinding\sdocumentation\sto\sdescribe\sthe\snewly\sadded\sability\nto\sspecify\sTCL\svariable\snames\sin\sthe\sbody\sof\san\sSQL\sstatement.\s(CVS\s1904)
|
||||||
D 2004-08-26T00:56:05
|
D 2004-08-26T01:12:14
|
||||||
F Makefile.in 4a5e570a9e2d35b09c31b3cf01b78cea764ade4b
|
F Makefile.in 4a5e570a9e2d35b09c31b3cf01b78cea764ade4b
|
||||||
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
|
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
|
||||||
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
|
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
|
||||||
@@ -239,11 +239,11 @@ F www/quickstart.tcl 4e97bef825e6a4153c43afb9f97235fc4da278ab
|
|||||||
F www/speed.tcl 19cf0c1bf73c4b534dfafc95b3eacff4825740b4
|
F www/speed.tcl 19cf0c1bf73c4b534dfafc95b3eacff4825740b4
|
||||||
F www/sqlite.tcl b51fd15f0531a54874de785a9efba323eecd5975
|
F www/sqlite.tcl b51fd15f0531a54874de785a9efba323eecd5975
|
||||||
F www/support.tcl 96c8324cea27b5ded53ff5c60c127ba2053f688e
|
F www/support.tcl 96c8324cea27b5ded53ff5c60c127ba2053f688e
|
||||||
F www/tclsqlite.tcl 06a86cba4d7fc88e2bcd633b57702d3d16abebb5
|
F www/tclsqlite.tcl 560ecd6a916b320e59f2917317398f3d59b7cc25
|
||||||
F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9
|
F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9
|
||||||
F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
|
F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
|
||||||
F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
|
F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
|
||||||
P fd584d1ccf6643b723c2ff0a7a16c2aea3f1142c
|
P 6199f2f243514bbd4befbf768a7e03aec775bed2
|
||||||
R c2945f067807301ea9f9b82dd56f837f
|
R f973acd39b99533a4d32c0284d2f7a6d
|
||||||
U drh
|
U drh
|
||||||
Z 3e4b219d5ef080e3900472694ea85d39
|
Z e1a14528ab39e612df9c5d5bff54ca90
|
||||||
|
@@ -1 +1 @@
|
|||||||
6199f2f243514bbd4befbf768a7e03aec775bed2
|
b3b9e58103dd6c65c55caf9a25bc1c257b37df88
|
@@ -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.10 2004/07/21 14:54:50 drh Exp $}
|
set rcsid {$Id: tclsqlite.tcl,v 1.11 2004/08/26 01:12:14 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} {
|
||||||
@@ -20,7 +20,7 @@ programming interface.</p>
|
|||||||
<p>The interface to the SQLite library consists of single
|
<p>The interface to the SQLite library consists of single
|
||||||
tcl command named <b>sqlite</b> (version 2.8) or <b>sqlite3</b>
|
tcl command named <b>sqlite</b> (version 2.8) or <b>sqlite3</b>
|
||||||
(version 3.0). Because there is only this
|
(version 3.0). Because there is only this
|
||||||
one interface command, the interface is not placed in a separate
|
one command, the interface is not placed in a separate
|
||||||
namespace.</p>
|
namespace.</p>
|
||||||
|
|
||||||
<p>The <b>sqlite3</b> command is used as follows:</p>
|
<p>The <b>sqlite3</b> command is used as follows:</p>
|
||||||
@@ -117,7 +117,7 @@ like this:</p>
|
|||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<i>dbcmd</i> <b>eval</b> <i>sql</i>
|
<i>dbcmd</i> <b>eval</b> <i>sql</i>
|
||||||
?<i>array-name script</i>?
|
?<i>array-name </i>? ?<i>script</i>?
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -187,13 +187,13 @@ used to store a list of column names in the order that they appear.
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
If the array variable name is the empty string, then the value of
|
If the array variable name is omitted or is the empty string, then the value of
|
||||||
each column is stored in a variable with the same name as the column
|
each column is stored in a variable with the same name as the column
|
||||||
itself. For example:
|
itself. For example:
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<b>db1 eval {SELECT * FROM t1 ORDER BY a} {} {<br>
|
<b>db1 eval {SELECT * FROM t1 ORDER BY a} {<br>
|
||||||
puts "a=$a b=$b"<br>
|
puts "a=$a b=$b"<br>
|
||||||
}</b>
|
}</b>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
@@ -207,6 +207,25 @@ a=1 b=hello<br>
|
|||||||
a=2 b=goodbye<br>
|
a=2 b=goodbye<br>
|
||||||
a=3 b=howdy!</b>
|
a=3 b=howdy!</b>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Tcl variable names can appear in the SQL statement of the second argument
|
||||||
|
in any position where it is legal to put a string or number literal. The
|
||||||
|
value of the variable is substituted for the variable name. If the
|
||||||
|
variable does not exist a NULL values is used. For example:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<blockquote><b>
|
||||||
|
db1 eval {INSERT INTO t1 VALUES(5,$bigblob)}
|
||||||
|
</b></blockquote>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Note that it is not necessary to quote the $bigblob value. That happens
|
||||||
|
automatically. If $bigblob is a large string or binary object, this
|
||||||
|
technique is not only easier to write, it is also much more efficient
|
||||||
|
since it avoids making a copy of the content of $bigblob.
|
||||||
|
</p>
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
Reference in New Issue
Block a user