Index: main.mk ================================================================== --- main.mk +++ main.mk @@ -482,10 +482,13 @@ tclsh $(TOP)/www/vdbe.tcl >vdbe.html version3.html: $(TOP)/www/version3.tcl tclsh $(TOP)/www/version3.tcl >version3.html +compile.html: $(TOP)/www/compile.tcl + tclsh $(TOP)/www/compile.tcl >compile.html + # Files to be published on the website. # DOC = \ arch.html \ @@ -519,11 +522,12 @@ sqlite.gif \ sqlite.html \ support.html \ tclsqlite.html \ vdbe.html \ - version3.html + version3.html \ + compile.html doc: common.tcl $(DOC) mkdir -p doc mv $(DOC) doc Index: src/sqlite.h.in ================================================================== --- src/sqlite.h.in +++ src/sqlite.h.in @@ -10,11 +10,11 @@ ** ************************************************************************* ** This header file defines the interface that the SQLite library ** presents to client programs. ** -** @(#) $Id: sqlite.h.in,v 1.122 2004/11/12 15:53:37 danielk1977 Exp $ +** @(#) $Id: sqlite.h.in,v 1.123 2004/11/20 06:05:56 danielk1977 Exp $ */ #ifndef _SQLITE3_H_ #define _SQLITE3_H_ #include /* Needed for the definition of va_list */ @@ -447,12 +447,12 @@ void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*); /* ** This routine configures a callback function - the progress callback - that ** is invoked periodically during long running calls to sqlite3_exec(), -** sqlite3_step() and sqlite3_get_table(). An example use for this API is to keep -** a GUI updated during a large query. +** sqlite3_step() and sqlite3_get_table(). An example use for this API is to +** keep a GUI updated during a large query. ** ** The progress callback is invoked once for every N virtual machine opcodes, ** where N is the second argument to this function. The progress callback ** itself is identified by the third argument to this function. The fourth ** argument to this function is a void pointer passed to the progress callback ADDED www/compile.tcl Index: www/compile.tcl ================================================================== --- /dev/null +++ www/compile.tcl @@ -0,0 +1,226 @@ +# +# Run this Tcl script to generate the compile.html file. +# +set rcsid {$Id: compile.tcl,v 1.1 2004/11/20 06:05:56 danielk1977 Exp $ } +source common.tcl +header {Compilation Options For SQLite} + +puts { +

Compilation Options For SQLite

+ +

+For most purposes, SQLite can be built just fine using the default +compilation options. However, if required, the compile-time options +documented below can be used to +omit SQLite features (resulting in +a smaller compiled library size) or to change the +default values of some parameters. +

+

+Every effort has been made to ensure that the various combinations +of compilation options work harmoniously and produce a working library. +Nevertheless, it is strongly recommended that the SQLite test-suite +be executed to check for errors before using an SQLite library built +with non-standard compilation options. +

+ +

Options To Set Default Parameter Values

+ +

SQLITE_DEFAULT_AUTOVACUUM=<1 or 0>
+This macro determines if SQLite creates databases with the +auto-vacuum +flag set by default. The default value is 0 (do not create auto-vacuum +databases). In any case the compile-time default may be overridden by the +"PRAGMA auto_vacuum" command. +

+ +

SQLITE_DEFAULT_PAGE_SIZE=<bytes>
+This macro is used to set the default page-size used when a +database is created. The value assigned must be a power of 2. The +default value is 1024. The compile-time default may be overridden at +runtime by the "PRAGMA page_size" command. + +

SQLITE_MAX_PAGE_SIZE=<bytes>
+This is used to set the maximum allowable page-size that can +be specified by the "PRAGMA page_size" command. The default value +is 8192. + + +

Options To Omit Features

+ +

The following options are used to reduce the size of the compiled +library by omiting optional features. This is probably only useful +in embedded systems where space is especially tight, as even with all +features included the SQLite library is relatively small. Don't forget +to tell your compiler to optimize for binary size! (the -Os option if +using GCC).

+ +

The macros in this section do not require values. The following +compilation switches all have the same effect:
+-DSQLITE_OMIT_ALTERTABLE
+-DSQLITE_OMIT_ALTERTABLE=1
+-DSQLITE_OMIT_ALTERTABLE=0 +

+ +

SQLITE_OMIT_ALTERTABLE
+When this option is defined, the +ALTER TABLE command is not included in the +library. Executing an ALTER TABLE statement causes a parse error. +

+

TODO: Need a link here - ALTER TABLE is not documented yet

+ +

SQLITE_OMIT_AUTHORIZATION
+Defining this option omits the authorization callback feature from the +library. The +sqlite3_set_authorizer() API function is not present in the library. +

+ +

SQLITE_OMIT_AUTOVACUUM
+If this option is defined, the library cannot create or write to +databases that support +auto-vacuum. Executing a +"PRAGMA auto_vacuum" statement is not an error, but does not return a value +or modify the auto-vacuum flag in the database file. If a database that +supports auto-vacuum is opened by a library compiled with this option, it +is automatically opened in read-only mode. +

+ +

SQLITE_OMIT_AUTOINCREMENT
+This option is used to omit the AUTOINCREMENT functionality. When this +is macro is defined, columns declared as "INTEGER PRIMARY KEY AUTOINCREMENT" +behave in the same way as columns declared as "INTEGER PRIMARY KEY" when a +NULL is inserted. The sqlite_sequence system table is neither created, nor +respected if it already exists. +

+

TODO: Need a link here - AUTOINCREMENT is not yet documented

+ +

SQLITE_OMIT_BLOB_LITERAL
+When this option is defined, it is not possible to specify a blob in +an SQL statement using the X'ABCD' syntax.

+

WARNING: The VACUUM command depends on this syntax for vacuuming databases +that contain blobs, so disabling this functionality may render a database +unvacuumable. +

+

TODO: Need a link here - is that syntax documented anywhere?

+ +

SQLITE_OMIT_COMPOUND_SELECT
+This option is used to omit the compound SELECT functionality. +SELECT statements that use the +UNION, UNION ALL, INTERSECT or EXCEPT compound SELECT operators will +cause a parse error. +

+ +

SQLITE_OMIT_CONFLICT_CLAUSE
+In the future, this option will be used to omit the +ON CONFLICT clause from the library. +

+ +

SQLITE_OMIT_DATETIME_FUNCS
+If this option is defined, SQLite's built-in date and time manipulation +functions are omitted. Specifically, the SQL functions julianday(), date(), +time(), datetime() and strftime() are not available. The default column +values CURRENT_TIME, CURRENT_DATE and CURRENT_DATETIME are still available. +

+ +

SQLITE_OMIT_EXPLAIN
+Defining this option causes the EXPLAIN command to be omitted from the +library. Attempting to execute an EXPLAIN statement will cause a parse +error. +

+ +

SQLITE_OMIT_FLOATING_POINT
+This option is used to omit floating-point number support from the SQLite +library. When specified, specifying a floating point number as a literal +(i.e. "1.01") results in a parse error. +

+

In the future, this option may also disable other floating point +functionality, for example the sqlite3_result_double(), +sqlite3_bind_double(), sqlite3_value_double() and sqlite3_column_double() +API functions. +

+ +

SQLITE_OMIT_FOREIGN_KEY
+If this option is defined, FOREIGN KEY clauses in column declarations are +ignored. +

+ +

SQLITE_OMIT_INTEGRITY_CHECK
+This option may be used to omit the +"PRAGMA integrity_check" +command from the compiled library. +

+ +

SQLITE_OMIT_MEMORYDB
+When this is defined, the library does not respect the special database +name ":memory:" (normally used to create an in-memory database). If +":memory:" is passed to sqlite3_open(), a file with this name will be +opened or created. +

+ +

SQLITE_OMIT_PAGER_PRAGMAS
+Defining this option omits pragmas related to the pager subsystem from +the build. Currently, the +default_cache_size and +cache_size pragmas are omitted. +

+ +

SQLITE_OMIT_PRAGMA
+This option is used to omit the PRAGMA command +from the library. Note that it is useful to define the macros that omit +specific pragmas in addition to this, as they may also remove supporting code +in other sub-systems. This macro removes the PRAGMA command only. +

+ +

SQLITE_OMIT_PROGRESS_CALLBACK
+This option may be defined to omit the capability to issue "progress" +callbacks during long-running SQL statements. The +sqlite3_progress_handler() +API function is not present in the library. + +

SQLITE_OMIT_REINDEX
+When this option is defined, the REINDEX +command is not included in the library. Executing a REINDEX statement causes +a parse error. + +

TODO: Need a link here - REINDEX is not documented yet

+ +

SQLITE_OMIT_SCHEMA_PRAGMAS
+Defining this option omits pragmas for querying the database schema from +the build. Currently, the +table_info, +index_info, +index_list and +database_list +pragmas are omitted. +

+ +

SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS
+Defining this option omits pragmas for querying the database schema from +the build. Currently, the +table_info, +index_info, +index_list and +database_list +pragmas are omitted. +

+ +

SQLITE_OMIT_TCL_VARIABLE
+Document me!

+ +

SQLITE_OMIT_TRIGGER
+Document me!

+ +

SQLITE_OMIT_UTF16
+Document me!

+ +

SQLITE_OMIT_VACUUM
+When this option is defined, the VACUUM +command is not included in the library. Executing a VACUUM statement causes +a parse error. +

+ +

SQLITE_OMIT_VIEW
+Document me!

+} +footer $rcsid + Index: www/docs.tcl ================================================================== --- www/docs.tcl +++ www/docs.tcl @@ -1,9 +1,9 @@ # This script generates the "docs.html" page that describes various # sources of documentation available for SQLite. # -set rcsid {$Id: docs.tcl,v 1.7 2004/11/10 05:48:57 danielk1977 Exp $} +set rcsid {$Id: docs.tcl,v 1.8 2004/11/20 06:05:56 danielk1977 Exp $} source common.tcl header {SQLite Documentation} puts {

Available Documentation

@@ -107,8 +107,14 @@ This document is an automatically generated description of the various opcodes that the VDBE understands. Programmers can use this document as a reference to better understand the output of EXPLAIN listings from SQLite. } + +doc {Compilation Options} {compile.html} { + This document describes the compile time options that may be set to + modify the default behaviour of the library or omit optional features + in order to reduce binary size. +} puts {
} footer $rcsid Index: www/pragma.tcl ================================================================== --- www/pragma.tcl +++ www/pragma.tcl @@ -1,9 +1,9 @@ # # Run this Tcl script to generate the pragma.html file. # -set rcsid {$Id: pragma.tcl,v 1.4 2004/11/19 11:59:24 danielk1977 Exp $} +set rcsid {$Id: pragma.tcl,v 1.5 2004/11/20 06:05:56 danielk1977 Exp $} source common.tcl header {Pragma statements supported by SQLite} proc Section {name {label {}}} { puts "\n
" @@ -291,18 +291,20 @@ Section {Pragmas to debug the library} debug puts {