1
1
#
2
2
# Run this Tcl script to generate the sqlite.html file.
3
3
#
4
- set rcsid {$Id : lang.tcl,v 1.54 2003/05/07 03:59:10 jplyon Exp $}
4
+ set rcsid {$Id : lang.tcl,v 1.55 2003/05/07 04:04:17 jplyon Exp $}
5
5
6
6
puts {<html>
7
7
<head>
@@ -1188,6 +1188,7 @@ with caution.</p>
1188
1188
<p>The current implementation supports the following pragmas:</p>
1189
1189
1190
1190
<ul>
1191
+ <a name=" pragma_cache_size" ></a>
1191
1192
<li><p><b>PRAGMA cache_size;
1192
1193
<br>PRAGMA cache_size = </b><i>Number-of-pages</i><b>;</b></p>
1193
1194
<p>Query or change the maximum number of database disk pages that SQLite
@@ -1199,8 +1200,8 @@ with caution.</p>
1199
1200
<p>When you change the cache size using the cache_size pragma, the
1200
1201
change only endures for the current session. The cache size reverts
1201
1202
to the default value when the database is closed and reopened. Use
1202
- the <b>default_cache_size</b> pragma to check the cache size permanently
1203
- </p></li>
1203
+ the <a href= " #pragma_default_cache_size " >< b>default_cache_size</b></a>
1204
+ pragma to check the cache size permanently. </p></li>
1204
1205
1205
1206
<li><p><b>PRAGMA count_changes = ON;
1206
1207
<br>PRAGMA count_changes = OFF;</b></p>
@@ -1210,15 +1211,25 @@ with caution.</p>
1210
1211
<p>This pragma may be removed from future versions of SQLite.
1211
1212
Consider using the <b>sqlite_changes()</b> API function instead.</p></li>
1212
1213
1214
+ <li><p><b>PRAGMA database_list;</b></p>
1215
+ <p>For each open database, invoke the callback function once with
1216
+ information about that database. Arguments include the index and
1217
+ the name the datbase was attached with. The first row will be for
1218
+ the main database. The second row will be for the database used to
1219
+ store temporary tables.</p></li>
1220
+
1221
+ <a name=" pragma_default_cache_size" ></a>
1213
1222
<li><p><b>PRAGMA default_cache_size;
1214
1223
<br>PRAGMA default_cache_size = </b><i>Number-of-pages</i><b>;</b></p>
1215
1224
<p>Query or change the maximum number of database disk pages that SQLite
1216
1225
will hold in memory at once. Each page uses about 1.5K of memory.
1217
- This pragma works like the <b>cache_size</b> pragma with the addition
1226
+ This pragma works like the <a href=" #pragma_cache_size" ><b>cache_size</b></a>
1227
+ pragma with the additional
1218
1228
feature that it changes the cache size persistently. With this pragma,
1219
1229
you can set the cache size once and that setting is retained and reused
1220
1230
everytime you reopen the database.</p></li>
1221
1231
1232
+ <a name=" pragma_default_synchronous" ></a>
1222
1233
<li><p><b>PRAGMA default_synchronous;
1223
1234
<br>PRAGMA default_synchronous = FULL;
1224
1235
<br>PRAGMA default_synchronous = NORMAL;
@@ -1247,10 +1258,28 @@ with caution.</p>
1247
1258
</p>
1248
1259
<p>This pragma changes the synchronous mode persistently. Once changed,
1249
1260
the mode stays as set even if the database is closed and reopened. The
1250
- <b>synchronous</b> pragma does the same thing but only applies the setting
1251
- to the current session.</p>
1261
+ <a href=" #pragma_synchronous" ><b>synchronous</b></a> pragma does the same
1262
+ thing but only applies the setting to the current session.</p></li>
1263
+
1264
+ <a name=" pragma_default_temp_store" ></a>
1265
+ <li><p><b>PRAGMA default_temp_store;
1266
+ <br>PRAGMA default_temp_store = DEFAULT;
1267
+ <br>PRAGMA default_temp_store = MEMORY;
1268
+ <br>PRAGMA default_temp_store = FILE;</b></p>
1269
+ <p>Query or change the setting of the " temp_store" flag stored in
1270
+ the database. When temp_store is DEFAULT, the compile-time default
1271
+ is used for the temporary database. When temp_store is MEMORY, an
1272
+ in-memory database is used. When temp_store is FILE, a temporary
1273
+ database file on disk will be used. Note that it is possible for
1274
+ the library compile-time options to override this setting. Once
1275
+ the temporary database is in use, its location cannot be changed.</p>
1276
+
1277
+ <p>This pragma changes the temp_store mode persistently. Once changed,
1278
+ the mode stays as set even if the database is closed and reopened. The
1279
+ <a href=" #pragma_temp_store" ><b>temp_store</b></a> pragma does the same
1280
+ thing but only applies the setting to the current session.</p></li>
1252
1281
1253
- <a name=" pragma_empty_result_callbacks" >
1282
+ <a name=" pragma_empty_result_callbacks" ></a>
1254
1283
<li><p><b>PRAGMA empty_result_callbacks = ON;
1255
1284
<br>PRAGMA empty_result_callbacks = OFF;</b></p>
1256
1285
<p>When on, the EMPTY_RESULT_CALLBACKS pragma causes the callback
@@ -1259,7 +1288,7 @@ with caution.</p>
1259
1288
because there is no data to report. But the second " <b>argc</b>" and
1260
1289
fourth " <b>columnNames</b>" parameters are valid and can be used to
1261
1290
determine the number and names of the columns that would have been in
1262
- the result set had the set not been empty.</p>
1291
+ the result set had the set not been empty.</p></li>
1263
1292
1264
1293
<li><p><b>PRAGMA full_column_names = ON;
1265
1294
<br>PRAGMA full_column_names = OFF;</b></p>
@@ -1272,28 +1301,28 @@ with caution.</p>
1272
1301
<p>For each column that the named index references, invoke the
1273
1302
callback function
1274
1303
once with information about that column, including the column name,
1275
- and the column number.</p>
1304
+ and the column number.</p></li>
1276
1305
1277
1306
<li><p><b>PRAGMA index_list(</b><i>table-name</i><b>);</b></p>
1278
1307
<p>For each index on the named table, invoke the callback function
1279
1308
once with information about that index. Arguments include the
1280
1309
index name and a flag to indicate whether or not the index must be
1281
- unique.</p>
1282
-
1283
- <li><p><b>PRAGMA parser_trace = ON;<br>PRAGMA parser_trace = OFF;</b></p>
1284
- <p>Turn tracing of the SQL parser inside of the
1285
- SQLite library on and off. This is used for debugging.
1286
- This only works if the library is compiled without the NDEBUG macro.
1287
- </p></li>
1310
+ unique.</p></li>
1288
1311
1289
1312
<li><p><b>PRAGMA integrity_check;</b></p>
1290
1313
<p>The command does an integrity check of the entire database. It
1291
1314
looks for out-of-order records, missing pages, and malformed records.
1292
1315
If any problems are found, then a single string is returned which is
1293
1316
a description of all problems. If everything is in order, " ok" is
1294
- returned.</p>
1317
+ returned.</p></li>
1295
1318
1296
- <a name=" pragma_show_datatypes" >
1319
+ <li><p><b>PRAGMA parser_trace = ON;<br>PRAGMA parser_trace = OFF;</b></p>
1320
+ <p>Turn tracing of the SQL parser inside of the
1321
+ SQLite library on and off. This is used for debugging.
1322
+ This only works if the library is compiled without the NDEBUG macro.
1323
+ </p></li>
1324
+
1325
+ <a name=" pragma_show_datatypes" ></a>
1297
1326
<li><p><b>PRAGMA show_datatypes = ON;<br>PRAGMA show_datatypes = OFF;</b></p>
1298
1327
<p>When turned on, the SHOW_DATATYPES pragma causes extra entries containing
1299
1328
the names of <a href=" datatypes.html" >datatypes</a> of columns to be
@@ -1325,22 +1354,38 @@ with caution.</p>
1325
1354
azCol[6] = 0;
1326
1355
</td></table></blockquote></li>
1327
1356
1357
+ <a name=" pragma_synchronous" ></a>
1328
1358
<li><p><b>PRAGMA synchronous;
1329
1359
<br>PRAGMA synchronous = FULL;
1330
1360
<br>PRAGMA synchronous = NORMAL;
1331
1361
<br>PRAGMA synchronous = OFF;</b></p>
1332
- <p>Query or change the setting of the " synchronous" flag in
1333
- the database for the duration of the current database connect .
1362
+ <p>Query or change the setting of the " synchronous" flag affecting
1363
+ the database for the duration of the current database connection .
1334
1364
The synchronous flag reverts to its default value when the database
1335
1365
is closed and reopened. For additional information on the synchronous
1336
- flag, see the description of the <b>default_synchronous</b> pragma.</p>
1366
+ flag, see the description of the <a href=" #pragma_default_synchronous" >
1367
+ <b>default_synchronous</b></a> pragma.</p>
1337
1368
</li>
1338
1369
1339
1370
<li><p><b>PRAGMA table_info(</b><i>table-name</i><b>);</b></p>
1340
1371
<p>For each column in the named table, invoke the callback function
1341
1372
once with information about that column, including the column name,
1342
1373
data type, whether or not the column can be NULL, and the default
1343
- value for the column.</p>
1374
+ value for the column.</p></li>
1375
+
1376
+ <a name=" pragma_temp_store" ></a>
1377
+ <li><p><b>PRAGMA temp_store;
1378
+ <br>PRAGMA temp_store = default;
1379
+ <br>PRAGMA temp_store = memory;
1380
+ <br>PRAGMA temp_store = file;</b></p>
1381
+ <p>Query or change the setting of the " temp_store" flag affecting
1382
+ the database for the duration of the current database connection.
1383
+ The temp_store flag reverts to its default value when the database
1384
+ is closed and reopened. For additional information on the temp_store
1385
+ flag, see the description of the <a href=" #pragma_default_temp_store" >
1386
+ <b>default_temp_store</b></a> pragma. Note that it is possible for
1387
+ the library compile-time options to override this setting. </p>
1388
+ </li>
1344
1389
1345
1390
<li><p><b>PRAGMA vdbe_trace = ON;<br>PRAGMA vdbe_trace = OFF;</b></p>
1346
1391
<p>Turn tracing of the virtual database engine inside of the
0 commit comments