Update some documentation for version 3.1. (CVS 2188)
FossilOrigin-Name: 5b7a5a4d69be425163135698d889797d15f56492
This commit is contained in:
parent
cc6bd38380
commit
307a777932
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Fix\san\sassertion\sfailure\sdue\sto\sinteraction\sbetween\sthe\scount_changes\spragma\sand\striggers.\s(CVS\s2187)
|
||||
D 2005-01-10T02:48:49
|
||||
C Update\ssome\sdocumentation\sfor\sversion\s3.1.\s(CVS\s2188)
|
||||
D 2005-01-10T06:39:57
|
||||
F Makefile.in ecf441ac5ca1ccfc8748a8a9537706e69893dfa4
|
||||
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
|
||||
F README a01693e454a00cc117967e3f9fdab2d4d52e9bc1
|
||||
@ -247,14 +247,14 @@ F www/faq.tcl abe360e630d8134bc6242c5e3664969c397eac6e
|
||||
F www/fileformat.tcl 900c95b9633abc3dcfc384d9ddd8eb4876793059
|
||||
F www/formatchng.tcl bfbf14dbf5181e771d06da7797767b0200b36d8a
|
||||
F www/index.tcl bb67c0d13020641d1fb4c043afa1f40fcc144d88
|
||||
F www/lang.tcl 9670e34e0a4a518b7de27a68055f49a790b6a840
|
||||
F www/lang.tcl a79b222f29cd94e11aee7bb0e69e133d55b03602
|
||||
F www/lockingv3.tcl f59b19d6c8920a931f096699d6faaf61c05db55f
|
||||
F www/mingw.tcl d96b451568c5d28545fefe0c80bee3431c73f69c
|
||||
F www/nulls.tcl ec35193f92485b87b90a994a01d0171b58823fcf
|
||||
F www/oldnews.tcl 7aa4478e64631859770a5fe4b413919ba6ee8a08
|
||||
F www/omitted.tcl 7bd62b6f0f53b60c5360895b16b3af8407bbca03
|
||||
F www/opcode.tcl dafa030a5a3cc24a2f9fd4cfbfb7d7323d2151b0
|
||||
F www/pragma.tcl 8c6b5662875bccde826324fe0e37edda39b870f4
|
||||
F www/pragma.tcl f2f507d50755fea3636fbb956048aac4b14ee837
|
||||
F www/quickstart.tcl 6f6f694b6139be2d967b1492eb9a6bdf7058aa60
|
||||
F www/speed.tcl de99c82c4729a10b6733463636f15473c4ec95bc
|
||||
F www/sqlite.tcl b51fd15f0531a54874de785a9efba323eecd5975
|
||||
@ -263,7 +263,7 @@ F www/tclsqlite.tcl e73f8f8e5f20e8277619433f7970060ab01088fc
|
||||
F www/vdbe.tcl 095f106d93875c94b47367384ebc870517431618
|
||||
F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
|
||||
F www/whentouse.tcl c3b50d3ac31c54be2a1af9b488a89d22f1e6e746
|
||||
P ad10953799f3aa15fde41cbbd5911a3b56c326ec
|
||||
R 1ac4cd5c08a83609a7da947b3ea99143
|
||||
P 6c7bec1b3aee0287e30f43c1d6a7b67b1c47e774
|
||||
R 7068bc64df143e31a5d1b0a4a0ebbc69
|
||||
U danielk1977
|
||||
Z 66f70bfca0a624fd768df4e664b868f3
|
||||
Z 5c1fa24d0389e66faa5fc6c7963ab21a
|
||||
|
@ -1 +1 @@
|
||||
6c7bec1b3aee0287e30f43c1d6a7b67b1c47e774
|
||||
5b7a5a4d69be425163135698d889797d15f56492
|
73
www/lang.tcl
73
www/lang.tcl
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Run this Tcl script to generate the lang-*.html files.
|
||||
#
|
||||
set rcsid {$Id: lang.tcl,v 1.80 2004/11/21 01:02:01 drh Exp $}
|
||||
set rcsid {$Id: lang.tcl,v 1.81 2005/01/10 06:39:57 danielk1977 Exp $}
|
||||
source common.tcl
|
||||
|
||||
if {[llength $argv]>0} {
|
||||
@ -887,7 +887,8 @@ Section expression expr
|
||||
|
||||
Syntax {expr} {
|
||||
<expr> <binary-op> <expr> |
|
||||
<expr> <like-op> <expr> |
|
||||
<expr> <like-op> <expr> [ESCAPE <expr>] |
|
||||
<expr> <glob-op> <expr> |
|
||||
<unary-op> <expr> |
|
||||
( <expr> ) |
|
||||
<column-name> |
|
||||
@ -904,7 +905,9 @@ Syntax {expr} {
|
||||
( <select-statement> ) |
|
||||
CASE [<expr>] LP WHEN <expr> THEN <expr> RPPLUS [ELSE <expr>] END
|
||||
} {like-op} {
|
||||
LIKE | GLOB | NOT LIKE | NOT GLOB
|
||||
LIKE | NOT LIKE
|
||||
} {glob-op} {
|
||||
GLOB | NOT GLOB
|
||||
}
|
||||
|
||||
puts {
|
||||
@ -950,21 +953,48 @@ operand modulo its right operand.</p>"
|
||||
puts {
|
||||
|
||||
<a name="like"></a>
|
||||
<p>The LIKE operator does a pattern matching comparison. The operand
|
||||
to the right contains the pattern, the left hand operand contains the
|
||||
string to match against the pattern.
|
||||
}
|
||||
puts "A percent symbol [Operator %] in the pattern matches any
|
||||
sequence of zero or more characters in the string. An underscore
|
||||
[Operator _] in the pattern matches any single character in the
|
||||
string. Any other character matches itself or it's lower/upper case
|
||||
equivalent (i.e. case-insensitive matching). (A bug: SQLite only
|
||||
understands upper/lower case for 7-bit Latin characters. Hence the
|
||||
LIKE operator is case sensitive for 8-bit iso8859 characters or UTF-8
|
||||
characters. For example, the expression <b>'a' LIKE 'A'</b>
|
||||
is TRUE but <b>'æ' LIKE 'Æ'</b> is FALSE.).</p>"
|
||||
|
||||
puts {
|
||||
<p>If the optional ESCAPE clause is present, then the expression
|
||||
following the ESCAPE keyword must evaluate to a string consisting of
|
||||
a single character. This character may be used in the LIKE pattern
|
||||
to include literal percent or underscore characters. The escape
|
||||
character followed by a percent symbol, underscore or itself matches a
|
||||
literal percent symbol, underscore or escape character in the string,
|
||||
respectively. The infix LIKE operator is implemented by calling the
|
||||
user function <a href="#likeFunc"> like(<i>X</i>,<i>Y</i>)</a>.</p>
|
||||
}
|
||||
|
||||
puts {
|
||||
<p>The LIKE operator does a wildcard comparison. The operand
|
||||
to the right contains the wildcards.}
|
||||
puts "A percent symbol [Operator %] in the right operand
|
||||
matches any sequence of zero or more characters on the left.
|
||||
An underscore [Operator _] on the right
|
||||
matches any single character on the left."
|
||||
puts {The LIKE operator is
|
||||
not case sensitive and will match upper case characters on one
|
||||
side against lower case characters on the other.
|
||||
|
||||
puts {
|
||||
The LIKE operator is not case sensitive and will match upper case
|
||||
characters on one side against lower case characters on the other.
|
||||
(A bug: SQLite only understands upper/lower case for 7-bit Latin
|
||||
characters. Hence the LIKE operator is case sensitive for
|
||||
8-bit iso8859 characters or UTF-8 characters. For example,
|
||||
the expression <b>'a' LIKE 'A'</b> is TRUE but
|
||||
<b>'æ' LIKE 'Æ'</b> is FALSE.). The infix
|
||||
LIKE operator is identical the user function <a href="#likeFunc">
|
||||
characters. Hence the LIKE operator is case sensitive for 8-bit
|
||||
iso8859 characters or UTF-8 characters. For example, the expression
|
||||
<b>'a' LIKE 'A'</b> is TRUE but
|
||||
<b>'æ' LIKE 'Æ'</b> is FALSE.). The infix LIKE
|
||||
operator is identical the user function <a href="#likeFunc">
|
||||
like(<i>X</i>,<i>Y</i>)</a>.
|
||||
</p>
|
||||
|
||||
@ -1067,13 +1097,20 @@ characters is returned, not the number of bytes.</td>
|
||||
|
||||
<tr>
|
||||
<a name="likeFunc"></a>
|
||||
<td valign="top" align="right">like(<i>X</i>,<i>Y</i>)</td>
|
||||
<td valign="top">This function is used to implement the
|
||||
"<b>X LIKE Y</b>" syntax of SQL. The
|
||||
<a href="capi3ref.html#sqlite3_create_function">sqlite_create_function()</a>
|
||||
interface can
|
||||
be used to override this function and thereby change the operation
|
||||
of the <a href="#like">LIKE</a> operator.</td>
|
||||
<td valign="top" align="right">like(<i>X</i>,<i>Y</i> [,<i>Z</i>])</td>
|
||||
<td valign="top">
|
||||
This function is used to implement the "<b>X LIKE Y [ESCAPE Z]</b>"
|
||||
syntax of SQL. If the optional ESCAPE clause is present, then the
|
||||
user-function is invoked with three arguments. Otherwise, it is
|
||||
invoked with two arguments only. The
|
||||
<a href="capi3ref.html#sqlite3_create_function">
|
||||
sqlite_create_function()</a> interface can be used to override this
|
||||
function and thereby change the operation of the <a
|
||||
href= "#like">LIKE</a> operator. When doing this, it may be important
|
||||
to override both the two and three argument versions of the like()
|
||||
function. Otherwise, different code may be called to implement the
|
||||
LIKE operator depending on whether or not an ESCAPE clause was
|
||||
specified.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
202
www/pragma.tcl
202
www/pragma.tcl
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Run this Tcl script to generate the pragma.html file.
|
||||
#
|
||||
set rcsid {$Id: pragma.tcl,v 1.7 2004/12/20 19:01:34 tpoindex Exp $}
|
||||
set rcsid {$Id: pragma.tcl,v 1.8 2005/01/10 06:39:57 danielk1977 Exp $}
|
||||
source common.tcl
|
||||
header {Pragma statements supported by SQLite}
|
||||
|
||||
@ -108,6 +108,17 @@ puts {
|
||||
the <a href="#pragma_default_cache_size"><b>default_cache_size</b></a>
|
||||
pragma to check the cache size permanently.</p></li>
|
||||
|
||||
<a name="pragma_count_changes"></a>
|
||||
<li><p><b>PRAGMA count_changes;
|
||||
<br>PRAGMA count_changes = </b><i>0 | 1</i><b>;</b></p>
|
||||
<p>Query or change the count-changes flag. Normally, when the
|
||||
count-changes flag is not set, INSERT, UPDATE and DELETE statements
|
||||
return no data. When count-changes is set, each of these commands
|
||||
returns a single row of data consisting of one integer value - the
|
||||
number of rows inserted, modified or deleted by the command. The
|
||||
returned change count does not include any insertions, modifications
|
||||
or deletions performed by triggers.</p>
|
||||
|
||||
<a name="pragma_default_cache_size"></a>
|
||||
<li><p><b>PRAGMA default_cache_size;
|
||||
<br>PRAGMA default_cache_size = </b><i>Number-of-pages</i><b>;</b></p>
|
||||
@ -121,13 +132,98 @@ puts {
|
||||
you can set the cache size once and that setting is retained and reused
|
||||
every time you reopen the database.</p></li>
|
||||
|
||||
<a name="pragma_default_synchronous"></a>
|
||||
<li><p><b>PRAGMA default_synchronous;
|
||||
<br>PRAGMA default_synchronous = FULL; </b>(2)<b>
|
||||
<br>PRAGMA default_synchronous = NORMAL; </b>(1)<b>
|
||||
<br>PRAGMA default_synchronous = OFF; </b>(0)</p>
|
||||
<p>Query or change the setting of the "synchronous" flag in
|
||||
the database. The first (query) form will return the setting as an
|
||||
<a name="pragma_empty_result_callbacks"></a>
|
||||
<li><p><b>PRAGMA empty_result_callbacks;
|
||||
<br>PRAGMA empty_result_callbacks = </b><i>0 | 1</i><b>;</b></p>
|
||||
<p>Query or change the empty-result-callbacks flag.</p>
|
||||
<p>The empty-result-callbacks flag affects the sqlite3_exec API only.
|
||||
Normally, when the empty-result-callbacks flag is cleared, the
|
||||
callback function supplied to the sqlite3_exec() call is not invoked
|
||||
for commands that return zero rows of data. When empty-result-callbacks
|
||||
is set in this situation, the callback function is invoked exactly once,
|
||||
with the third parameter set to 0 (NULL). This is to enable programs
|
||||
that use the sqlite3_exec() API to retrieve column-names even when
|
||||
a query returns no data.
|
||||
</p>
|
||||
|
||||
<a name="pragma_encoding"></a>
|
||||
<li><p><b>PRAGMA encoding;
|
||||
<br>PRAGMA encoding = "UTF-8";
|
||||
<br>PRAGMA encoding = "UTF-16";
|
||||
<br>PRAGMA encoding = "UTF-16le";
|
||||
<br>PRAGMA encoding = "UTF-16be";</b></p>
|
||||
<p>In it's first form, if the main database has already been
|
||||
created, then this pragma returns the text encoding used by the
|
||||
main database, one of "UTF-8", "UTF-16le" (little-endian UTF-16
|
||||
encoding) or "UTF-16be" (big-endian UTF-16 encoding). If the main
|
||||
database has not already been created, then the value returned is the
|
||||
text encoding that will be used to create the main database, if
|
||||
it is created by this session.</p>
|
||||
<p>The second and subsequent forms of this pragma are only useful if
|
||||
the main database has not already been created. In this case the
|
||||
pragma sets the encoding that the main database will be created with if
|
||||
it is created by this session. The string "UTF-16" is interpreted
|
||||
as "UTF-16 encoding using native machine byte-ordering".</p>
|
||||
<p>Databases created by the ATTACH command always use the same encoding
|
||||
as the main database.</p>
|
||||
</li>
|
||||
|
||||
<a name="pragma_full_column_names"></a>
|
||||
<li><p><b>PRAGMA full_column_names;
|
||||
<br>PRAGMA full_column_names = </b><i>0 | 1</i><b>;</b></p>
|
||||
<p>Query or change the full-column-names flag. This flag affects
|
||||
the way SQLite names columns of data returned by SELECT statements
|
||||
when the expression for the column is a table-column name or the
|
||||
wildcard "*". Normally, such result columns are named
|
||||
<table-name/alias>.<column-name> if the SELECT statement joins two or
|
||||
more tables together, or simply <column-name> if the SELECT
|
||||
statement queries a single table. When the full-column-names flag
|
||||
is set, such columns are always named <table-name/alias>.<column-name>,
|
||||
regardless of whether or not a join is performed.
|
||||
</p>
|
||||
<p>If both the short-column-names and full-column-names are set,
|
||||
then the behaviour associated with the full-column-names flag is
|
||||
exhibited.
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<a name="pragma_page_size"></a>
|
||||
<li><p><b>PRAGMA page_size;
|
||||
<br>PRAGMA page_size = </b><i>bytes</i><b>;</b></p>
|
||||
<p>Query or set the page-size of the database. The page-size
|
||||
may only be set if the database has not yet been created. The page
|
||||
size must be a power of two greater than or equal to 512 and less
|
||||
than or equal to 8192. The upper limit may be modified by setting
|
||||
the value of macro SQLITE_MAX_PAGE_SIZE during compilation.
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<a name="pragma_short_column_names"></a>
|
||||
<li><p><b>PRAGMA full_column_names;
|
||||
<br>PRAGMA full_column_names = </b><i>0 | 1</i><b>;</b></p>
|
||||
<p>Query or change the short-column-names flag. This flag affects
|
||||
the way SQLite names columns of data returned by SELECT statements
|
||||
when the expression for the column is a table-column name or the
|
||||
wildcard "*". Normally, such result columns are named
|
||||
<table-name/alias>.<column-name> if the SELECT statement joins two or
|
||||
more tables together, or simply <column-name> if the SELECT
|
||||
statement queries a single table. When the short-column-names flag
|
||||
is set, such columns are always named <column-name>, regardless of
|
||||
whether or not a join is performed.
|
||||
</p>
|
||||
<p>If both the short-column-names and full-column-names are set,
|
||||
then the behaviour associated with the full-column-names flag is
|
||||
exhibited.
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<a name="pragma_synchronous"></a>
|
||||
<li><p><b>PRAGMA synchronous;
|
||||
<br>PRAGMA synchronous = FULL; </b>(2)<b>
|
||||
<br>PRAGMA synchronous = NORMAL; </b>(1)<b>
|
||||
<br>PRAGMA synchronous = OFF; </b>(0)</p>
|
||||
<p>Query or change the setting of the "synchronous" flag.
|
||||
The first (query) form will return the setting as an
|
||||
integer. When synchronous is FULL (2), the SQLite database engine will
|
||||
pause at critical moments to make sure that data has actually been
|
||||
written to the disk surface before continuing. This ensures that if
|
||||
@ -148,57 +244,8 @@ puts {
|
||||
crashes or the computer loses power before that data has been written
|
||||
to the disk surface. On the other hand, some
|
||||
operations are as much as 50 or more times faster with synchronous OFF.
|
||||
</p>
|
||||
<p>This pragma changes the synchronous mode persistently. Once changed,
|
||||
the mode stays as set even if the database is closed and reopened. The
|
||||
<a href="#pragma_synchronous"><b>synchronous</b></a> pragma does the same
|
||||
thing but only applies the setting to the current session.
|
||||
|
||||
</p></li>
|
||||
|
||||
<a name="pragma_default_temp_store"></a>
|
||||
<li><p><b>PRAGMA default_temp_store;
|
||||
<br>PRAGMA default_temp_store = DEFAULT; </b>(0)<b>
|
||||
<br>PRAGMA default_temp_store = MEMORY; </b>(2)<b>
|
||||
<br>PRAGMA default_temp_store = FILE;</b> (1)</p>
|
||||
<p>Query or change the setting of the "<b>temp_store</b>" flag stored in
|
||||
the database. When temp_store is DEFAULT (0), the compile-time value
|
||||
of the symbol TEMP_STORE is used for the temporary database.
|
||||
When temp_store is MEMORY (2), an in-memory database is used.
|
||||
When temp_store is FILE (1), a temporary database file on disk will be used.
|
||||
It is possible for the library compile-time symbol TEMP_STORE to override
|
||||
this setting. The following table summarizes this:</p>
|
||||
|
||||
<table cellpadding="2">
|
||||
<tr><th>TEMP_STORE</th><th>temp_store</th><th>temp database location</th></tr>
|
||||
<tr><td align="center">0</td><td align="center"><em>any</em></td><td align="center">file</td></tr>
|
||||
<tr><td align="center">1</td><td align="center">0</td><td align="center">file</td></tr>
|
||||
<tr><td align="center">1</td><td align="center">1</td><td align="center">file</td></tr>
|
||||
<tr><td align="center">1</td><td align="center">2</td><td align="center">memory</td></tr>
|
||||
<tr><td align="center">2</td><td align="center">0</td><td align="center">memory</td></tr>
|
||||
<tr><td align="center">2</td><td align="center">1</td><td align="center">file</td></tr>
|
||||
<tr><td align="center">2</td><td align="center">2</td><td align="center">memory</td></tr>
|
||||
<tr><td align="center">3</td><td align="center"><em>any</em></td><td align="center">memory</td></tr>
|
||||
</table>
|
||||
|
||||
<p>This pragma changes the temp_store mode for whenever the database
|
||||
is opened in the future. The temp_store mode for the current session
|
||||
is unchanged. Use the
|
||||
<a href="#pragma_temp_store"><b>temp_store</b></a> pragma to change the
|
||||
temp_store mode for the current session.</p></li>
|
||||
|
||||
<a name="pragma_synchronous"></a>
|
||||
<li><p><b>PRAGMA synchronous;
|
||||
<br>PRAGMA synchronous = FULL; </b>(2)<b>
|
||||
<br>PRAGMA synchronous = NORMAL; </b>(1)<b>
|
||||
<br>PRAGMA synchronous = OFF;</b> (0)</p>
|
||||
<p>Query or change the setting of the "synchronous" flag affecting
|
||||
the database for the duration of the current database connection.
|
||||
The synchronous flag reverts to its default value when the database
|
||||
is closed and reopened. For additional information on the synchronous
|
||||
flag, see the description of the <a href="#pragma_default_synchronous">
|
||||
<b>default_synchronous</b></a> pragma.</p>
|
||||
</li>
|
||||
|
||||
<a name="pragma_temp_store"></a>
|
||||
<li><p><b>PRAGMA temp_store;
|
||||
@ -211,14 +258,41 @@ puts {
|
||||
is closed and reopened. For additional information on the temp_store
|
||||
flag, see the description of the <a href="#pragma_default_temp_store">
|
||||
<b>default_temp_store</b></a> pragma. Note that it is possible for
|
||||
the library compile-time options to override this setting. See
|
||||
PRAGMA <a href="#pragma_temp_store_directory">temp_store_directory</a>
|
||||
for further temporary storage options when <b>FILE</b> is specified.</p>
|
||||
the library compile-time options to override this setting.
|
||||
|
||||
<p>When the temp_store setting is changed, all existing temporary
|
||||
tables, indices, triggers, and viewers are immediately deleted.
|
||||
</p>
|
||||
</li>
|
||||
<a name="pragma_temp_store"></a>
|
||||
<li><p><b>PRAGMA temp_store;
|
||||
<br>PRAGMA temp_store = DEFAULT; </b>(0)<b>
|
||||
<br>PRAGMA temp_store = MEMORY; </b>(2)<b>
|
||||
<br>PRAGMA temp_store = FILE;</b> (1)</p>
|
||||
<p>Query or change the setting of the "<b>temp_store</b>" parameter.
|
||||
When temp_store is DEFAULT (0), the compile-time value of the
|
||||
symbol TEMP_STORE is used for the temporary database. When
|
||||
temp_store is MEMORY (2), an in-memory database is used.
|
||||
When temp_store is FILE (1), a temporary database file on disk
|
||||
will be used. See PRAGMA <a href="#pragma_temp_store_directory">
|
||||
temp_store_directory</a> for further temporary storage options when
|
||||
<b>FILE</b> is specified. When the temp_store setting is changed,
|
||||
all existing temporary tables, indices, triggers, and viewers are
|
||||
immediately deleted.</p>
|
||||
|
||||
<p>It is possible for the library compile-time symbol
|
||||
TEMP_STORE to override this setting. The following table summarizes
|
||||
this:</p>
|
||||
|
||||
<table cellpadding="2">
|
||||
<tr><th>TEMP_STORE</th><th>temp_store</th><th>temp database location</th></tr>
|
||||
<tr><td align="center">0</td><td align="center"><em>any</em></td><td align="center">file</td></tr>
|
||||
<tr><td align="center">1</td><td align="center">0</td><td align="center">file</td></tr>
|
||||
<tr><td align="center">1</td><td align="center">1</td><td align="center">file</td></tr>
|
||||
<tr><td align="center">1</td><td align="center">2</td><td align="center">memory</td></tr>
|
||||
<tr><td align="center">2</td><td align="center">0</td><td align="center">memory</td></tr>
|
||||
<tr><td align="center">2</td><td align="center">1</td><td align="center">file</td></tr>
|
||||
<tr><td align="center">2</td><td align="center">2</td><td align="center">memory</td></tr>
|
||||
<tr><td align="center">3</td><td align="center"><em>any</em></td><td align="center">memory</td></tr>
|
||||
</table>
|
||||
</li>
|
||||
<br>
|
||||
|
||||
<a name="pragma_temp_store_directory"></a>
|
||||
<li><p><b>PRAGMA temp_store_directory;
|
||||
|
Loading…
x
Reference in New Issue
Block a user