mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
:-) (CVS 88)
FossilOrigin-Name: 3252269e9005fe3f31f285506430e33d1031da88
This commit is contained in:
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
|||||||
C :-)\s(CVS\s87)
|
C :-)\s(CVS\s88)
|
||||||
D 2000-06-09T01:58:36
|
D 2000-06-09T03:47:19
|
||||||
F COPYRIGHT 74a8a6531a42e124df07ab5599aad63870fa0bd4
|
F COPYRIGHT 74a8a6531a42e124df07ab5599aad63870fa0bd4
|
||||||
F Makefile.in a0cc8da380c65002af452dfb72b3e82e1d33b04d
|
F Makefile.in a0cc8da380c65002af452dfb72b3e82e1d33b04d
|
||||||
F README 51f6a4e7408b34afa5bc1c0485f61b6a4efb6958
|
F README 51f6a4e7408b34afa5bc1c0485f61b6a4efb6958
|
||||||
@ -59,11 +59,11 @@ F www/arch.tcl 282d91f509aadd0873f8aa9b357a2c0b4b175979
|
|||||||
F www/c_interface.tcl 9ac800854272db5fe439e07b7435b243a5422293
|
F www/c_interface.tcl 9ac800854272db5fe439e07b7435b243a5422293
|
||||||
F www/changes.tcl 04e66b4257589ff78a7e1de93e9dda4725fb03d6
|
F www/changes.tcl 04e66b4257589ff78a7e1de93e9dda4725fb03d6
|
||||||
F www/fileformat.tcl b11435fcd2cf2238a1c5e6d16fe5e83bcd14d434
|
F www/fileformat.tcl b11435fcd2cf2238a1c5e6d16fe5e83bcd14d434
|
||||||
F www/index.tcl b2c288000f14383501b157a57ee4506561d62f45
|
F www/index.tcl ecbcaab2fc36974f1de09e4c2d49683f83fb2e67
|
||||||
F www/lang.tcl eb6a297c55d9856c94da4635eab815b09e4f96bb
|
F www/lang.tcl d694c3f3614aa6a6903923437d8f520a2ee97332
|
||||||
F www/opcode.tcl 8be80bace48450ef4b9a34dcef4f846f7e5fb2b5
|
F www/opcode.tcl 8be80bace48450ef4b9a34dcef4f846f7e5fb2b5
|
||||||
F www/sqlite.tcl 5420eab24b539928f80ea9b3088e2549d34f438d
|
F www/sqlite.tcl 5420eab24b539928f80ea9b3088e2549d34f438d
|
||||||
P 049abcb37def4200fb8f4ad7cea60a1d53ee3219
|
P 3661b5ff93b01da7fea9f85370ecdda1402b7164
|
||||||
R cbc86aaf3901beefb4f0dfae3fd3db17
|
R 1c91211af4f45cd4c54a752007d31361
|
||||||
U drh
|
U drh
|
||||||
Z 0d4f983c5b2e1877564119b56f0ca7bf
|
Z aa73dbfe7525340c7da35901373ae50e
|
||||||
|
@ -1 +1 @@
|
|||||||
3661b5ff93b01da7fea9f85370ecdda1402b7164
|
3252269e9005fe3f31f285506430e33d1031da88
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Run this TCL script to generate HTML for the index.html file.
|
# Run this TCL script to generate HTML for the index.html file.
|
||||||
#
|
#
|
||||||
set rcsid {$Id: index.tcl,v 1.15 2000/06/08 19:38:36 drh Exp $}
|
set rcsid {$Id: index.tcl,v 1.16 2000/06/09 03:47:19 drh Exp $}
|
||||||
|
|
||||||
puts {<html>
|
puts {<html>
|
||||||
<head><title>SQLite: An SQL Database Engine Built Atop GDBM</title></head>
|
<head><title>SQLite: An SQL Database Engine Built Atop GDBM</title></head>
|
||||||
@ -94,6 +94,10 @@ Among the SQL features that SQLite does not currently implement are:</p>
|
|||||||
command-line utility.</li>
|
command-line utility.</li>
|
||||||
<li>The <a href="c_interface.html">C/C++ Interface</a>.</li>
|
<li>The <a href="c_interface.html">C/C++ Interface</a>.</li>
|
||||||
<li>The <a href="fileformat.html">file format</a> used by SQLite databases.</li>
|
<li>The <a href="fileformat.html">file format</a> used by SQLite databases.</li>
|
||||||
|
<li>The <a href="arch.html">Architecture of the SQLite Library</a> describes
|
||||||
|
how the library is put together. <b>(preliminary)</b></li>
|
||||||
|
<li>The <a href="lang.html">SQL Language</a> subset understood by SQLite.
|
||||||
|
<b>(under development)</b></li>
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
183
www/lang.tcl
183
www/lang.tcl
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Run this Tcl script to generate the sqlite.html file.
|
# Run this Tcl script to generate the sqlite.html file.
|
||||||
#
|
#
|
||||||
set rcsid {$Id: lang.tcl,v 1.2 2000/06/09 01:58:37 drh Exp $}
|
set rcsid {$Id: lang.tcl,v 1.3 2000/06/09 03:47:19 drh Exp $}
|
||||||
|
|
||||||
puts {<html>
|
puts {<html>
|
||||||
<head>
|
<head>
|
||||||
@ -46,6 +46,8 @@ foreach {section} [lsort -index 0 -dictionary {
|
|||||||
{UPDATE update}
|
{UPDATE update}
|
||||||
{SELECT select}
|
{SELECT select}
|
||||||
{COPY copy}
|
{COPY copy}
|
||||||
|
{EXPLAIN explain}
|
||||||
|
{expressions expr}
|
||||||
}] {
|
}] {
|
||||||
puts "<li><a href=\"#[lindex $section 1]\">[lindex $section 0]</a></li>"
|
puts "<li><a href=\"#[lindex $section 1]\">[lindex $section 0]</a></li>"
|
||||||
}
|
}
|
||||||
@ -67,7 +69,9 @@ proc Syntax {args} {
|
|||||||
regsub -all {[]|[*?]} $body {</font></b>&<b><font color="#2c2cf0">} body
|
regsub -all {[]|[*?]} $body {</font></b>&<b><font color="#2c2cf0">} body
|
||||||
regsub -all "\n" [string trim $body] "<br>\n" body
|
regsub -all "\n" [string trim $body] "<br>\n" body
|
||||||
regsub -all "\n *" $body "\n\\ \\ \\ \\ " body
|
regsub -all "\n *" $body "\n\\ \\ \\ \\ " body
|
||||||
regsub -all {[|,*()]} $body {<big>&</big>} body
|
regsub -all {[|,.*()]} $body {<big>&</big>} body
|
||||||
|
regsub -all { = } $body { <big>=</big> } body
|
||||||
|
regsub -all {STAR} $body {<big>*</big>} body
|
||||||
puts "<td><b><font color=\"#2c2cf0\">$body</font></b></td></tr>"
|
puts "<td><b><font color=\"#2c2cf0\">$body</font></b></td></tr>"
|
||||||
}
|
}
|
||||||
puts {</table>}
|
puts {</table>}
|
||||||
@ -85,6 +89,41 @@ proc Example {text} {
|
|||||||
puts "<blockquote><pre>$text</pre></blockquote>"
|
puts "<blockquote><pre>$text</pre></blockquote>"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Section COPY copy
|
||||||
|
|
||||||
|
Syntax {sql-statement} {
|
||||||
|
COPY <table-name> FROM <string>
|
||||||
|
}
|
||||||
|
|
||||||
|
Section {CREATE INDEX} createindex
|
||||||
|
|
||||||
|
Syntax {sql-statement} {
|
||||||
|
CREATE INDEX <index-name>
|
||||||
|
ON <table-name> ( <column-name> [, <column-name>]* )
|
||||||
|
} {column-name} {
|
||||||
|
<name> [ ASC | DESC ]
|
||||||
|
}
|
||||||
|
|
||||||
|
puts {
|
||||||
|
<p>The CREATE INDEX command consists of the keywords "CREATE INDEX" followed
|
||||||
|
by the name of the new index, the keyword "ON" the name of a previously
|
||||||
|
created table that is to be indexed, and a parenthesized list of names of
|
||||||
|
columns in the table that are used for the index key.
|
||||||
|
Each column name can be followed by one of the "ASC" or "DESC" keywords
|
||||||
|
to indicate sort order, but since GDBM does not implement ordered keys,
|
||||||
|
these keywords are ignored.</p>
|
||||||
|
|
||||||
|
<p>There are no arbitrary limits on the number of indices that can be
|
||||||
|
attached to a single table, nor on the number of columns in an index.</p>
|
||||||
|
|
||||||
|
<p>The exact text
|
||||||
|
of each CREATE INDEX statement is stored in the <b>sqlite_master</b>
|
||||||
|
table. Everytime the database is opened, all CREATE INDEX statements
|
||||||
|
are read from the <b>sqlite_master</b> table and used to regenerate
|
||||||
|
SQLite's internal representation of the index layout.</p>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Section {CREATE TABLE} {createtable}
|
Section {CREATE TABLE} {createtable}
|
||||||
|
|
||||||
Syntax {sql-command} {
|
Syntax {sql-command} {
|
||||||
@ -140,34 +179,28 @@ are read from the <b>sqlite_master</b> table and used to regenerate
|
|||||||
SQLite's internal representation of the table layout.</p>
|
SQLite's internal representation of the table layout.</p>
|
||||||
}
|
}
|
||||||
|
|
||||||
Section {CREATE INDEX} createindex
|
Section DELETE delete
|
||||||
|
|
||||||
Syntax {sql-statement} {
|
Syntax {sql-statement} {
|
||||||
CREATE INDEX <index-name>
|
DELETE FROM <table-name> [WHERE <expression>]
|
||||||
ON <table-name> ( <column-name> [, <column-name>]* )
|
|
||||||
} {column-name} {
|
|
||||||
<name> [ ASC | DESC ]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
puts {
|
puts {
|
||||||
<p>The CREATE INDEX command consists of the keywords "CREATE INDEX" followed
|
<p></p>
|
||||||
by the name of the new index, the keyword "ON" the name of a previously
|
|
||||||
created table that is to be indexed, and a parenthesized list of names of
|
|
||||||
columns in the table that are used for the index key.
|
|
||||||
Each column name can be followed by one of the "ASC" or "DESC" keywords
|
|
||||||
to indicate sort order, but since GDBM does not implement ordered keys,
|
|
||||||
these keywords are ignored.</p>
|
|
||||||
|
|
||||||
<p>There are no arbitrary limits on the number of indices that can be
|
|
||||||
attached to a single table, nor on the number of columns in an index.</p>
|
|
||||||
|
|
||||||
<p>The exact text
|
|
||||||
of each CREATE INDEX statement is stored in the <b>sqlite_master</b>
|
|
||||||
table. Everytime the database is opened, all CREATE INDEX statements
|
|
||||||
are read from the <b>sqlite_master</b> table and used to regenerate
|
|
||||||
SQLite's internal representation of the index layout.</p>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Section {DROP INDEX} dropindex
|
||||||
|
|
||||||
|
Syntax {sql-command} {
|
||||||
|
DROP INDEX <index-name>
|
||||||
|
}
|
||||||
|
|
||||||
|
puts {
|
||||||
|
<p>The DROP INDEX statement consists of the keywords "DROP INDEX" followed
|
||||||
|
by the name of the index. The index named is completely removed from
|
||||||
|
the disk. The only way to recover the index is to reenter the
|
||||||
|
appropriate CREATE INDEX command.</p>
|
||||||
|
}
|
||||||
|
|
||||||
Section {DROP TABLE} droptable
|
Section {DROP TABLE} droptable
|
||||||
|
|
||||||
@ -181,17 +214,92 @@ by the name of the table. The table named is completely removed from
|
|||||||
the disk. The table can not be recovered. All indices associated with
|
the disk. The table can not be recovered. All indices associated with
|
||||||
the table are also reversibly deleted.</p>}
|
the table are also reversibly deleted.</p>}
|
||||||
|
|
||||||
Section {DROP INDEX} dropindex
|
Section EXPLAIN explain
|
||||||
|
|
||||||
Syntax {sql-command} {
|
Syntax {sql-statement} {
|
||||||
DROP INDEX <index-name>
|
EXPLAIN <sql-statement>
|
||||||
|
}
|
||||||
|
|
||||||
|
Section expression expr
|
||||||
|
|
||||||
|
Syntax {expression} {
|
||||||
|
<expression> <binary-op> <expression> |
|
||||||
|
<expression> <like-op> <expression> |
|
||||||
|
<unary-op> <expression> |
|
||||||
|
( <expression> ) |
|
||||||
|
<column-name> |
|
||||||
|
<table-name> . <column-name> |
|
||||||
|
<literal-value> |
|
||||||
|
<function-name> ( <expr-list> | STAR ) |
|
||||||
|
<expression> ISNULL |
|
||||||
|
<expression> NOTNULL |
|
||||||
|
<expression> BETWEEN <expression> AND <expression> |
|
||||||
|
<expression> IN ( <value-list> ) |
|
||||||
|
<expression> IN ( <select> ) |
|
||||||
|
( <select> )
|
||||||
|
} {like-op} {
|
||||||
|
LIKE | GLOB | NOT LIKE | NOT GLOB
|
||||||
|
}
|
||||||
|
|
||||||
|
Section INSERT insert
|
||||||
|
|
||||||
|
Syntax {sql-statement} {
|
||||||
|
INSERT INTO <table-name> [( <column-list> )] VALUES ( <value-list> ) |
|
||||||
|
INSERT INTO <table-name> [( <column-list> )] <select-statement>
|
||||||
}
|
}
|
||||||
|
|
||||||
puts {
|
puts {
|
||||||
<p>The DROP INDEX statement consists of the keywords "DROP INDEX" followed
|
<p>The INSERT statement comes in two basic forms. The first form
|
||||||
by the name of the index. The index named is completely removed from
|
(with the "VALUES" keyword) creates a single new row in an existing table.
|
||||||
the disk. The only way to recover the index is to reenter the
|
If no column-list is specified then the number of values must
|
||||||
appropriate CREATE INDEX command.</p>
|
be the same as the number of columns in the table. If a column-list
|
||||||
|
is specified, then the number of values must match the number of
|
||||||
|
specified columns. Columns of the table that do not appear in the
|
||||||
|
column list are fill with the default value, or with NULL if not
|
||||||
|
default value is specified.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>The second form of the INSERT statement takes it data from a
|
||||||
|
SELECT statement. The number of columns in the result of the
|
||||||
|
SELECT must exactly match the number of columns in the table if
|
||||||
|
no column list is specified, or it must match the number of columns
|
||||||
|
name in the column list. A new entry is made in the table
|
||||||
|
for every row of the SELECT result. The SELECT may be simple
|
||||||
|
or compound. If the SELECT statement has an ORDER BY clause,
|
||||||
|
the ORDER BY is ignored.</p>
|
||||||
|
}
|
||||||
|
|
||||||
|
Section SELECT select
|
||||||
|
|
||||||
|
Syntax {sql-statement} {
|
||||||
|
SELECT <result> FROM <table-list>
|
||||||
|
[WHERE <expression>]
|
||||||
|
[GROUP BY <expr-list>]
|
||||||
|
[HAVING <expression>]
|
||||||
|
[<compound-op> <select>]*
|
||||||
|
[ORDER BY <sort-expr-list>]
|
||||||
|
} {result} {
|
||||||
|
STAR | <expresssion> [, <expression>]*
|
||||||
|
} {table-list} {
|
||||||
|
<table-name> [, <table-name>]*
|
||||||
|
} {sort-expr-list} {
|
||||||
|
<expr> [<sort-order>] [, <expr> [<sort-order>]]*
|
||||||
|
} {sort-order} {
|
||||||
|
ASC | DESC
|
||||||
|
} {compound_op} {
|
||||||
|
UNION | UNION ALL | INTERSECT | EXCEPT
|
||||||
|
}
|
||||||
|
|
||||||
|
Section UPDATE update
|
||||||
|
|
||||||
|
Syntax {sql-statement} {
|
||||||
|
UPDATE <table-name> SET <assignment> [, <assignment>] [WHERE <expression>]
|
||||||
|
} {assignment} {
|
||||||
|
<column-name> = <expression>
|
||||||
|
}
|
||||||
|
|
||||||
|
puts {
|
||||||
|
<p>
|
||||||
}
|
}
|
||||||
|
|
||||||
Section VACUUM vacuum
|
Section VACUUM vacuum
|
||||||
@ -214,21 +322,8 @@ the underlying GDBM file much smaller and will help queries to
|
|||||||
run much faster.</p>
|
run much faster.</p>
|
||||||
}
|
}
|
||||||
|
|
||||||
Section INSERT insert
|
|
||||||
|
|
||||||
Syntax {sql-statement} {
|
|
||||||
INSERT INTO <table-name> [( <column-list> )] VALUES ( <value-list> ) |
|
|
||||||
INSERT INTO <table-name> [( <column-list> )] <select-statement>
|
|
||||||
}
|
|
||||||
|
|
||||||
puts {
|
puts {
|
||||||
<p>The INSERT statement comes in two basic forms. The first form
|
<p></p>
|
||||||
(with the "VALUES" keyword) creates a single new row in an existing table.
|
|
||||||
If no column-list is specified then the number of values must
|
|
||||||
be the same as the number of columns in the table. If a column-list
|
|
||||||
is specified, then the number of values must match the number of
|
|
||||||
specified columns
|
|
||||||
</p>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
puts {
|
puts {
|
||||||
|
Reference in New Issue
Block a user