aboutsummaryrefslogtreecommitdiff
path: root/www/tclsqlite.tcl
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2003-08-19 14:31:01 +0000
committerdrh <drh@noemail.net>2003-08-19 14:31:01 +0000
commit5d9d7576264d4219240b9a4369b89cadd75a9bcc (patch)
treea30071bc223f7aa26306a432e9627a481f662f7b /www/tclsqlite.tcl
parente5e3760e1c571ea6d9c25f0be2952897f04b97ed (diff)
downloadsqlite-5d9d7576264d4219240b9a4369b89cadd75a9bcc.tar.gz
sqlite-5d9d7576264d4219240b9a4369b89cadd75a9bcc.zip
Add the "onecolumn" method to the TCL language bindings. (CVS 1076)
FossilOrigin-Name: c7b4c28fbc0bca5645af5750fd353f4eca400b40
Diffstat (limited to 'www/tclsqlite.tcl')
-rw-r--r--www/tclsqlite.tcl14
1 files changed, 13 insertions, 1 deletions
diff --git a/www/tclsqlite.tcl b/www/tclsqlite.tcl
index 862966cd1..776967d1b 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.7 2002/04/12 10:09:00 drh Exp $}
+set rcsid {$Id: tclsqlite.tcl,v 1.8 2003/08/19 14:31:02 drh Exp $}
puts {<html>
<head>
@@ -61,6 +61,7 @@ defined:</p>
<li> complete
<li> eval
<li> last_insert_rowid
+<li> onecolumn
<li> timeout
</ul>
</p>
@@ -249,6 +250,17 @@ should return "1" if it wants SQLite to abandon the current operation.
<p>The "last_insert_rowid" method returns an integer which is the ROWID
of the most recently inserted database row.</p>
+<h2>The "onecolumn" method</h2>
+
+<p>The "onecolumn" method works like "eval" in that it evaluates the
+SQL query statement given as its argument. The difference is that
+"onecolumn" returns a single element which is the first column of the
+first row of the query result.</p>
+
+<p>This is a convenience method. It saves the user from having to
+do a "<tt>[lindex&nbsp;...&nbsp;0]</tt>" on the results of an "eval"
+in order to extract a single column result.</p>
+
<h2>The "changes" method</h2>
<p>The "changes" method returns an integer which is the number of rows