documentation and speed updates (CVS 164)

FossilOrigin-Name: 356cdd64860b714f52529159fada799dca7bb1c0
This commit is contained in:
drh 2000-10-23 13:16:31 +00:00
parent 76634487b6
commit 8c3052c49b
7 changed files with 296 additions and 247 deletions

View File

@ -1 +1 @@
1.0.14
1.0.15

View File

@ -1,9 +1,9 @@
C remove\sunnecessary\scode\swhen\sNDEBUG\sis\sdefined\s(CVS\s163)
D 2000-10-23T01:08:00
C documentation\sand\sspeed\supdates\s(CVS\s164)
D 2000-10-23T13:16:32
F COPYRIGHT 74a8a6531a42e124df07ab5599aad63870fa0bd4
F Makefile.in 0b1fdafa55e1bf4d3a4f5213544130e66ef32052
F README 51f6a4e7408b34afa5bc1c0485f61b6a4efb6958
F VERSION 9c65d78e59cfa4cd1ee3aab6a1775f71371a5996
F VERSION 2503ef820e425375d682c88b36228a35fcaefea4
F configure 3dc1edb9dcf60215e31ff72b447935ab62211442 x
F configure.in d892ca33db7e88a055519ce2f36dcb11020e8fff
F doc/lemon.html e233a3e97a779c7a87e1bc4528c664a58e49dd47
@ -28,7 +28,7 @@ F src/tclsqlite.c 178adf318eab2ff480c288a87541d4ab1c37d985
F src/tokenize.c 95bf7baa7d829981bed81ca89080d99d2c09d463
F src/update.c 51b9ef7434b15e31096155da920302e9db0d27fc
F src/util.c 811e0ad47f842c16555aaf361b26dab7221c1a6c
F src/vdbe.c d69f691d1a4adc21c47b349078b6002f5eb6ae2a
F src/vdbe.c a19d5cefdd3d34fa28ddd1741363f2f3199ca56a
F src/vdbe.h 140cdec3c56f70483e169f8ae657bd90f9fd6e98
F src/where.c 3dfad2ffd0aa994d5eceac88852f7189c8d1d3c8
F test/all.test 71d439d4d8d5bb68ca73344ce6d2b1ebb35ab7dd
@ -65,8 +65,8 @@ F tool/renumberOps.awk 6d067177ad5f8d711b79577b462da9b3634bd0a9
F www/arch.fig 4f246003b7da23bd63b8b0af0618afb4ee3055c8
F www/arch.png 8dae0766d42ed3de9ed013c1341a5792bcf633e6
F www/arch.tcl a40380c1fe0080c43e6cc5c20ed70731511b06be
F www/c_interface.tcl 1a0b13d056625e4acb59b67edc360cfd9c92ba90
F www/changes.tcl 742f6ab4eeb9b74814169a242b4769b843769506
F www/c_interface.tcl 5e15e610397b50a9c2a9b2d1d96ec9c846638c07
F www/changes.tcl c31acb39bd4e961e966ac05347a3bbffa56c576d
F www/crosscompile.tcl bee79c34f6c3f162ec1c6f5294e79f73651d27ee
F www/fileformat.tcl cfb7fba80b7275555281ba2f256c00734bcdd1c9
F www/index.tcl b19418d506f90968deef972bf1b427d98bdf13e0
@ -74,9 +74,9 @@ F www/lang.tcl 9192e114b19987e630a41e879585b87006eb84a1
F www/mingw.tcl fc5f4ba9d336b6e8c97347cc6496d6162461ef60
F www/opcode.tcl cb3a1abf8b7b9be9f3a228d097d6bf8b742c2b6f
F www/sqlite.tcl cb0d23d8f061a80543928755ec7775da6e4f362f
F www/tclsqlite.tcl ae101d5f7c07dcc59770e2a84aae09025fab2dad
F www/tclsqlite.tcl 06f81c401f79a04f2c5ebfb97e7c176225c0aef2
F www/vdbe.tcl bcbfc33bcdd0ebad95eab31286adb9e1bc289520
P f0a5255d2657ddcba24353d6d94b0d9c579d8dec
R db2de82bead6490471b7e949022ed705
P 738e3e49f6d45e4393e35f7f5f65a41d3c2080c9
R 74743bda8c8d42a04097be9627f279df
U drh
Z 6ca067409ed7e73ca537183814c3e736
Z a0ef9da2461867f400eb1d06ab30709e

View File

@ -1 +1 @@
738e3e49f6d45e4393e35f7f5f65a41d3c2080c9
356cdd64860b714f52529159fada799dca7bb1c0

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
#
# Run this Tcl script to generate the sqlite.html file.
#
set rcsid {$Id: c_interface.tcl,v 1.11 2000/10/16 22:06:43 drh Exp $}
set rcsid {$Id: c_interface.tcl,v 1.12 2000/10/23 13:16:33 drh Exp $}
puts {<html>
<head>
@ -29,7 +29,7 @@ The core interface is as follows:</p>
<blockquote><pre>
typedef struct sqlite sqlite;
sqlite *sqlite_open(const char *filename, int mode, char **errmsg);
sqlite *sqlite_open(const char *dbname, int mode, char **errmsg);
void sqlite_close(sqlite*);
@ -134,8 +134,9 @@ written to memory obtained from malloc() and *errmsg will be made
to point to this error message. The calling function is responsible
for freeing the memory when it has finished with it.</p>
<p>An SQLite database is just a directory containing a collection of
GDBM files. There is one GDBM file for each table and index in the
<p>The name of an SQLite database is normally the name of a directory
that contains a collection of GDBM files that comprise the database.
There is one GDBM file for each table and index in the
database. All GDBM files end with the ".tbl" suffix. Every SQLite
database also contains a special database table named <b>sqlite_master</b>
stored in its own GDBM file. This special table records the database
@ -143,7 +144,20 @@ schema.</p>
<p>To create a new SQLite database, all you have to do is call
<b>sqlite_open()</b> with the first parameter set to the name of
an empty directory and the second parameter set to 0666.</p>
an empty directory and the second parameter set to 0666. The
directory is created automatically if it does not already exist.</p>
<p>Beginning with SQLite version 1.0.14, SQLite supports database
backends other than GDBM. The only backends currently supported
are the default GDBM driver and an in-memory hash table database.
You may anticipate additional backends in future versions of SQLite.</p>
<p>An alternative database backend is specified by prepending the
backend name and a colon to the database name argument of the
<b>sqlite_open()</b> function. For the GDBM backend, you can
prepend "<b>gdbm:</b>" to the directory name. To select the in-memory
hash table backend, prepend "<b>memory:</b>" to the database name.
Future database drivers will be selected by a similar mechanism.</p>
<p>The return value of the <b>sqlite_open()</b> function is a
pointer to an opaque <b>sqlite</b> structure. This pointer will

View File

@ -17,6 +17,13 @@ proc chng {date desc} {
puts "<DD><P><UL>$desc</UL></P></DD>"
}
chng {2000 Oct 23 (1.0.15)} {
<li>Documentation updates</li>
<li>Some sanity checking code was removed from the inner loop of vdbe.c
to help the library to run a little faster. The code is only
removed if you compile with -DNDEBUG.</li>
}
chng {2000 Oct 19 (1.0.14)} {
<li>Added a "memory:" backend driver that stores its database in an
in-memory hash table.</li>

View File

@ -1,7 +1,7 @@
#
# Run this Tcl script to generate the tclsqlite.html file.
#
set rcsid {$Id: tclsqlite.tcl,v 1.2 2000/10/08 22:20:58 drh Exp $}
set rcsid {$Id: tclsqlite.tcl,v 1.3 2000/10/23 13:16:33 drh Exp $}
puts {<html>
<head>
@ -30,19 +30,43 @@ namespace.</p>
<p>The <b>sqlite</b> command is used as follows:</p>
<blockquote>
<b>sqlite</b>&nbsp;&nbsp;<i>dbcmd&nbsp;&nbsp;database-directory-name</i>
<b>sqlite</b>&nbsp;&nbsp;<i>dbcmd&nbsp;&nbsp;database-name</i>
</blockquote>
<p>
The <b>sqlite</b> command opens the SQLite database located in the
directory named by the second argument. If the database or directory
does not exist, it is created. The <b>sqlite</b> command
also creates a new Tcl
The <b>sqlite</b> command opens the database named in the second
argument. If the database does not already exist, it is
automatically created.
The <b>sqlite</b> command also creates a new Tcl
command to control the database. The name of the new Tcl command
is given by the first argument. This approach is similar to the
way widgets are created in Tk.
</p>
<p>
The name of the database is usually either the name of a directory
that will contain the GDBM files that comprise the database, or it is the
name of the directory prefaced by "<b>gdbm:</b>". The second form
of the name is a new feature beginning in SQLite version 1.0.14 that
allows you to select alternative database backends. The default
backend is GDBM. But you can also select to store the database in
a hash table in memory by using the prefix "<b>memory:</b>".
Other backends may be added in the future.
</p>
<p>
Every time you open an SQLite database with the <b>memory:</b> prefix
on the database name, you get a new in-memory database. This is true
even if you open two databases with the same name. Furthermore,
an in-memory database is automatically deleted when the database is
closed and so is not useful for persistant storage like a normal
database. But the use of an in-memory SQL database does give Tcl/Tk
a powerful new data storage mechanism that can do things that are
difficult to do with only Tcl array variables. In fact, the
hash-table backend for SQLite was created for the sole purpose of
providing better data structure support to the Tcl language.
</p>
<p>
Once an SQLite database is open, it can be controlled using
methods of the <i>dbcmd</i>. There are currently 5 methods
@ -205,7 +229,7 @@ will wait for locks to clear before giving up on a database transaction.
The default timeout is 0 millisecond. (In other words, the default behavior
is not to wait at all.)</p>
<p>The GDBM library the underlies SQLite allows multiple simultaneous
<p>The GDBM backend allows multiple simultaneous
readers or a single writer but not both. If any process is writing to
the database no other process is allows to read or write. If any process
is reading the database other processes are allowed to read but not write.