SQLite

Check-in [f035dec94a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment::-) (CVS 31)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f035dec94aa1b9f76b18350a558debbb63f7834a
User & Date: drh 2000-06-01 00:03:44.000
Context
2000-06-01
00:04
:-) (CVS 32) (check-in: 81bee278dc user: drh tags: trunk)
00:03
:-) (CVS 31) (check-in: f035dec94a user: drh tags: trunk)
2000-05-31
23:33
:-) (CVS 30) (check-in: 9b8458bbce user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to www/index.tcl.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

23
24



25
26
27
28
29
30
31
32
#
# Run this TCL script to generate HTML for the index.html file.
#
set rcsid {$Id: index.tcl,v 1.7 2000/05/31 20:00:53 drh Exp $}

puts {<html>
<head><title>SQLite: An SQL Frontend For GDBM</title></head>
<body bgcolor=white>
<h1 align=center>SQLite: An SQL Frontend For GDBM</h1>
<p align=center>}
puts "Last modified [lrange $rcsid 3 4] GMT"
puts {</p>}

puts {
<blockquote><em><p>
SQLite is currently "alpha"-quality software under active development.
It is being release early so that you can have an opportunity
to comment on its design and implementation and possibly influence
the direction of its development.  Your constructive comments
are <b>very</b> important to us and are encouraged.  If you have 
any suggestions or any words of encouragement, please submit
them to the mailing list described <a href="#mailinglist">below</a>.</p>


<p>If you are looking for a stable SQL library, check back here in a few



months...</p></em></blockquote>
}

puts {<h2>Introduction</h2>

<p>SQLite is a C library that implements an SQL frontend to GDBM.
SQLite is intended for use in standalone programs that need 
to use an SQL database but which do not have access to a full-blown 



|











|
|
|
|
|
|
|
>

<
>
>
>
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

25
26
27
28
29
30
31
32
33
34
35
#
# Run this TCL script to generate HTML for the index.html file.
#
set rcsid {$Id: index.tcl,v 1.8 2000/06/01 00:03:44 drh Exp $}

puts {<html>
<head><title>SQLite: An SQL Frontend For GDBM</title></head>
<body bgcolor=white>
<h1 align=center>SQLite: An SQL Frontend For GDBM</h1>
<p align=center>}
puts "Last modified [lrange $rcsid 3 4] GMT"
puts {</p>}

puts {
<blockquote><em><p>
The SQLite code base is rapidly becoming usable.  Most of the commonly
used features of SQL (at least the features of SQL that this author
commonly uses) are now supported.  There are currently no known
errors in the code.  (There are known omissions but that is another
matter.)
One very large database (1M+ records in 50+ separate tables) has
been converted from PostgreSQL and gives every appearance of working
correctly.  We are rapidly approaching a "beta" release, I think...</p>


<p>Your constructive comments are still very important to us.
Please visit the 
<a href="#mailinglist">mailing list</a> to offer your feedback.</p>
</em></blockquote>
}

puts {<h2>Introduction</h2>

<p>SQLite is a C library that implements an SQL frontend to GDBM.
SQLite is intended for use in standalone programs that need 
to use an SQL database but which do not have access to a full-blown 
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<li>Nested queries</li>
<li>Transactions or rollback</li>
</ul>
</p>

<H2>Status</h2>

<p>The current version of SQLite should be considered "alpha" software.
It is incomplete and is known to contain bugs.  The software is
subject to incompatible changes with each release.  You should not use
SQLite in its present form in production software.</p>

<p>The purpose of releasing SQLite before it is ready is to evoke
public comment and criticism of the software.  If you find bugs
or have any thoughts on how to make SQLite better, or would
like to contribute code or patches to SQLite, please join
the mailing (see below) and let us know.</p>

<p>SQLite has so far been tested only on RedHat 6.0 Linux.  But we
know of no reason why it will not work on any other Unix platform,
or on Windows95/98/NT.</p>
}

puts {







|
<
<
<
|
<
<
<
|
|







64
65
66
67
68
69
70
71



72



73
74
75
76
77
78
79
80
81
<li>Nested queries</li>
<li>Transactions or rollback</li>
</ul>
</p>

<H2>Status</h2>

<p>The SQLite code is rapidly stablizing.  There are currently



no known errors in the code.  At least one large database has



be loaded into SQLite and appears to work.  Most of the major
functionality is in place.</p>

<p>SQLite has so far been tested only on RedHat 6.0 Linux.  But we
know of no reason why it will not work on any other Unix platform,
or on Windows95/98/NT.</p>
}

puts {
Changes to www/sqlite.tcl.
1
2
3
4
5
6
7
8
9
10
11
#
# Run this Tcl script to generate the sqlite.html file.
#
set rcsid {$Id: sqlite.tcl,v 1.4 2000/05/31 02:27:50 drh Exp $}

puts {<html>
<head>
  <title>sqlite: A program of interacting with SQLite databases</title>
</head>
<body bgcolor=white>
<h1 align=center>



|







1
2
3
4
5
6
7
8
9
10
11
#
# Run this Tcl script to generate the sqlite.html file.
#
set rcsid {$Id: sqlite.tcl,v 1.5 2000/06/01 00:03:44 drh Exp $}

puts {<html>
<head>
  <title>sqlite: A program of interacting with SQLite databases</title>
</head>
<body bgcolor=white>
<h1 align=center>
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187





188
189
190
191
192
193
194
Code {
sql> (((.help)))
.exit                  Exit this program
.explain               Set output mode suitable for EXPLAIN
.header ON|OFF         Turn display of headers on or off
.help                  Show this message
.indices TABLE         Show names of all indices on TABLE
.mode MODE             Set mode to one of "line", "column", or "list"
.output FILENAME       Send output to FILENAME
.output stdout         Send output to the screen
.schema ?TABLE?        Show the CREATE statements
.separator STRING      Change separator string for "list" mode
.tables                List names all tables in the database
.width NUM NUM ...     Set column widths for "column" mode
sql> 
}

puts {
<h2>Changing Output Formats</h2>

<p>The sqlite program is able to show the results of a query
in three different formats: "line", "column", and "list".  You can
use the ".mode" dot command to switch between these three output
formats.</p>

<p>In "line" mode (the default), each field in a record of the database
is shown on a line by itself.  Each line consists of the field
name, an equal sign and the field data.  Successive records are
separated by a blank line.  Here is an example of line mode
output:</p>}

Code {
sql> (((.mode line)))
sql> (((select * from tbl1;)))
one = hello
two = 10

one = goodbye
two = 20
sql>
}






puts {
<p>In column mode, each record is shown on a separate line with the
data aligned in columns.  For example:</p>}

Code {
sql> (((.mode column)))







|













|
|


|















>
>
>
>
>







147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
Code {
sql> (((.help)))
.exit                  Exit this program
.explain               Set output mode suitable for EXPLAIN
.header ON|OFF         Turn display of headers on or off
.help                  Show this message
.indices TABLE         Show names of all indices on TABLE
.mode MODE             Set mode to one of "line", "column", "list", or "html"
.output FILENAME       Send output to FILENAME
.output stdout         Send output to the screen
.schema ?TABLE?        Show the CREATE statements
.separator STRING      Change separator string for "list" mode
.tables                List names all tables in the database
.width NUM NUM ...     Set column widths for "column" mode
sql> 
}

puts {
<h2>Changing Output Formats</h2>

<p>The sqlite program is able to show the results of a query
in four different formats: "line", "column", "list", and "html".
You can use the ".mode" dot command to switch between these three output
formats.</p>

<p>In "line" mode, each field in a record of the database
is shown on a line by itself.  Each line consists of the field
name, an equal sign and the field data.  Successive records are
separated by a blank line.  Here is an example of line mode
output:</p>}

Code {
sql> (((.mode line)))
sql> (((select * from tbl1;)))
one = hello
two = 10

one = goodbye
two = 20
sql>
}

puts {
<p>Line mode used to be the default mode setting.  But recently the
default mode was changed to "list".</p>
}

puts {
<p>In column mode, each record is shown on a separate line with the
data aligned in columns.  For example:</p>}

Code {
sql> (((.mode column)))
259
260
261
262
263
264
265









266
267
268
269
270
271
272
Code {
sql> (((.separator ", ")))
sql> (((select * from tbl1;)))
hello, 10
goodbye, 20
sql>
}










puts {
<h2>Writing results to a file</h2>

<p>By default, sqlite sends query results to standard output.  You
can change this using the ".output" command.  Just put the name of
an output file as an argument to the .output command and all subsequent







>
>
>
>
>
>
>
>
>







264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
Code {
sql> (((.separator ", ")))
sql> (((select * from tbl1;)))
hello, 10
goodbye, 20
sql>
}

puts {
<p>The last output mode is "html".  In this mode, sqlite writes
the results of the query as an XHTML table.  The beginning
&lt;TABLE&;gt and the ending &lt;/TABLE&gt; are not written, but
all of the intervening &lt;TR&gt;s, &lt;TH&gt;s, and &lt;TD&gt;s
are.  The html output mode is envisioned as being useful for
CGI.</p>
}

puts {
<h2>Writing results to a file</h2>

<p>By default, sqlite sends query results to standard output.  You
can change this using the ".output" command.  Just put the name of
an output file as an argument to the .output command and all subsequent