/ Check-in [5efa2d2a]
Login

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

Overview
Comment:Add a documentation page for compilation options. Still some work to go. (CVS 2117)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 5efa2d2a602c3b7249c4e6701e97b16b5ad0280d
User & Date: danielk1977 2004-11-20 06:05:56
Context
2004-11-20
08:17
Documentation for REINDEX and ALTER TABLE commands. (CVS 2118) check-in: aceaa5f6 user: danielk1977 tags: trunk
06:05
Add a documentation page for compilation options. Still some work to go. (CVS 2117) check-in: 5efa2d2a user: danielk1977 tags: trunk
2004-11-19
11:59
Split up the lang.html page into a seperate page for each command. (CVS 2116) check-in: ea315668 user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to main.mk.

   480    480   
   481    481   vdbe.html:	$(TOP)/www/vdbe.tcl
   482    482   	tclsh $(TOP)/www/vdbe.tcl >vdbe.html
   483    483   
   484    484   version3.html:	$(TOP)/www/version3.tcl
   485    485   	tclsh $(TOP)/www/version3.tcl >version3.html
   486    486   
          487  +compile.html:	$(TOP)/www/compile.tcl
          488  +	tclsh $(TOP)/www/compile.tcl >compile.html
          489  +
   487    490   
   488    491   # Files to be published on the website.
   489    492   #
   490    493   DOC = \
   491    494     arch.html \
   492    495     arch.png \
   493    496     c_interface.html \
................................................................................
   517    520     quickstart.html \
   518    521     speed.html \
   519    522     sqlite.gif \
   520    523     sqlite.html \
   521    524     support.html \
   522    525     tclsqlite.html \
   523    526     vdbe.html \
   524         -  version3.html
          527  +  version3.html \
          528  +  compile.html
   525    529   
   526    530   doc:	common.tcl $(DOC)
   527    531   	mkdir -p doc
   528    532   	mv $(DOC) doc
   529    533   
   530    534   # Standard install and cleanup targets
   531    535   #

Changes to src/sqlite.h.in.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This header file defines the interface that the SQLite library
    13     13   ** presents to client programs.
    14     14   **
    15         -** @(#) $Id: sqlite.h.in,v 1.122 2004/11/12 15:53:37 danielk1977 Exp $
           15  +** @(#) $Id: sqlite.h.in,v 1.123 2004/11/20 06:05:56 danielk1977 Exp $
    16     16   */
    17     17   #ifndef _SQLITE3_H_
    18     18   #define _SQLITE3_H_
    19     19   #include <stdarg.h>     /* Needed for the definition of va_list */
    20     20   
    21     21   /*
    22     22   ** Make sure we can call this stuff from C++.
................................................................................
   445    445   ** a log file of all SQL executed against a database.
   446    446   */
   447    447   void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*);
   448    448   
   449    449   /*
   450    450   ** This routine configures a callback function - the progress callback - that
   451    451   ** is invoked periodically during long running calls to sqlite3_exec(),
   452         -** sqlite3_step() and sqlite3_get_table(). An example use for this API is to keep
   453         -** a GUI updated during a large query.
          452  +** sqlite3_step() and sqlite3_get_table(). An example use for this API is to 
          453  +** keep a GUI updated during a large query.
   454    454   **
   455    455   ** The progress callback is invoked once for every N virtual machine opcodes,
   456    456   ** where N is the second argument to this function. The progress callback
   457    457   ** itself is identified by the third argument to this function. The fourth
   458    458   ** argument to this function is a void pointer passed to the progress callback
   459    459   ** function each time it is invoked.
   460    460   **

Added www/compile.tcl.

            1  +#
            2  +# Run this Tcl script to generate the compile.html file.
            3  +#
            4  +set rcsid {$Id: compile.tcl,v 1.1 2004/11/20 06:05:56 danielk1977 Exp $ }
            5  +source common.tcl
            6  +header {Compilation Options For SQLite}
            7  +
            8  +puts {
            9  +<h1>Compilation Options For SQLite</h1>
           10  +
           11  +<p>
           12  +For most purposes, SQLite can be built just fine using the default
           13  +compilation options. However, if required, the compile-time options
           14  +documented below can be used to 
           15  +<a href="#omitfeatures">omit SQLite features</a> (resulting in
           16  +a smaller compiled library size) or to change the
           17  +<a href="#defaults">default values</a> of some parameters.
           18  +</p>
           19  +<p>
           20  +Every effort has been made to ensure that the various combinations
           21  +of compilation options work harmoniously and produce a working library.
           22  +Nevertheless, it is strongly recommended that the SQLite test-suite
           23  +be executed to check for errors before using an SQLite library built
           24  +with non-standard compilation options.
           25  +</p>
           26  +<a name="defaults"></a>
           27  +<h2>Options To Set Default Parameter Values</h2>
           28  +
           29  +<p><b>SQLITE_DEFAULT_AUTOVACUUM=<i>&lt;1 or 0&gt;</i></b><br>
           30  +This macro determines if SQLite creates databases with the 
           31  +<a href="pragma.html#pragma_auto_vacuum">auto-vacuum</a> 
           32  +flag set by default. The default value is 0 (do not create auto-vacuum
           33  +databases). In any case the compile-time default may be overridden by the 
           34  +"PRAGMA auto_vacuum" command.
           35  +</p>
           36  +
           37  +<p><b>SQLITE_DEFAULT_PAGE_SIZE=<i>&lt;bytes&gt;</i></b><br>
           38  +This macro is used to set the default page-size used when a
           39  +database is created. The value assigned must be a power of 2. The
           40  +default value is 1024. The compile-time default may be overridden at 
           41  +runtime by the "PRAGMA page_size" command.
           42  +
           43  +<p><b>SQLITE_MAX_PAGE_SIZE=<i>&lt;bytes&gt;</i></b><br>
           44  +This is used to set the maximum allowable page-size that can
           45  +be specified by the "PRAGMA page_size" command. The default value
           46  +is 8192.
           47  +
           48  +<a name="omitfeatures"></a>
           49  +<h2>Options To Omit Features</h2>
           50  +
           51  +<p>The following options are used to reduce the size of the compiled
           52  +library by omiting optional features. This is probably only useful
           53  +in embedded systems where space is especially tight, as even with all
           54  +features included the SQLite library is relatively small. Don't forget
           55  +to tell your compiler to optimize for binary size! (the -Os option if
           56  +using GCC).</p>
           57  +
           58  +<p>The macros in this section do not require values. The following 
           59  +compilation switches all have the same effect:<br>
           60  +-DSQLITE_OMIT_ALTERTABLE<br>
           61  +-DSQLITE_OMIT_ALTERTABLE=1<br>
           62  +-DSQLITE_OMIT_ALTERTABLE=0
           63  +</p>
           64  +
           65  +<p><b>SQLITE_OMIT_ALTERTABLE</b><br>
           66  +When this option is defined, the 
           67  +<a href="lang_altertable.html">ALTER TABLE</a> command is not included in the 
           68  +library. Executing an ALTER TABLE statement causes a parse error.
           69  +</p>
           70  +<p><i>TODO: Need a link here - ALTER TABLE is not documented yet</i><p>
           71  +
           72  +<p><b>SQLITE_OMIT_AUTHORIZATION</b><br>
           73  +Defining this option omits the authorization callback feature from the
           74  +library. The <a href="capi3ref.html#sqlite3_set_authorizer">
           75  +sqlite3_set_authorizer()</a> API function is not present in the library.
           76  +</p>
           77  +
           78  +<p><b>SQLITE_OMIT_AUTOVACUUM</b><br>
           79  +If this option is defined, the library cannot create or write to 
           80  +databases that support 
           81  +<a href="pragma.html#pragma_auto_vacuum">auto-vacuum</a>. Executing a
           82  +"PRAGMA auto_vacuum" statement is not an error, but does not return a value
           83  +or modify the auto-vacuum flag in the database file. If a database that
           84  +supports auto-vacuum is opened by a library compiled with this option, it
           85  +is automatically opened in read-only mode.
           86  +</p>
           87  +
           88  +<p><b>SQLITE_OMIT_AUTOINCREMENT</b><br>
           89  +This option is used to omit the AUTOINCREMENT functionality. When this 
           90  +is macro is defined, columns declared as "INTEGER PRIMARY KEY AUTOINCREMENT"
           91  +behave in the same way as columns declared as "INTEGER PRIMARY KEY" when a 
           92  +NULL is inserted. The sqlite_sequence system table is neither created, nor
           93  +respected if it already exists.
           94  +</p>
           95  +<p><i>TODO: Need a link here - AUTOINCREMENT is not yet documented</i><p>
           96  +
           97  +<p><b>SQLITE_OMIT_BLOB_LITERAL</b><br>
           98  +When this option is defined, it is not possible to specify a blob in
           99  +an SQL statement using the X'ABCD' syntax.</p> 
          100  +<p>WARNING: The VACUUM command depends on this syntax for vacuuming databases
          101  +that contain blobs, so disabling this functionality may render a database
          102  +unvacuumable.
          103  +</p>
          104  +<p><i>TODO: Need a link here - is that syntax documented anywhere?</i><p>
          105  +
          106  +<p><b>SQLITE_OMIT_COMPOUND_SELECT</b><br>
          107  +This option is used to omit the compound SELECT functionality. 
          108  +<a href="lang_select.html">SELECT statements</a> that use the 
          109  +UNION, UNION ALL, INTERSECT or EXCEPT compound SELECT operators will 
          110  +cause a parse error.
          111  +</p>
          112  +
          113  +<p><b>SQLITE_OMIT_CONFLICT_CLAUSE</b><br>
          114  +In the future, this option will be used to omit the 
          115  +<a href="lang_conflict.html">ON CONFLICT</a> clause from the library.
          116  +</p>
          117  +
          118  +<p><b>SQLITE_OMIT_DATETIME_FUNCS</b><br>
          119  +If this option is defined, SQLite's built-in date and time manipulation
          120  +functions are omitted. Specifically, the SQL functions julianday(), date(),
          121  +time(), datetime() and strftime() are not available. The default column
          122  +values CURRENT_TIME, CURRENT_DATE and CURRENT_DATETIME are still available.
          123  +</p>
          124  +
          125  +<p><b>SQLITE_OMIT_EXPLAIN</b><br>
          126  +Defining this option causes the EXPLAIN command to be omitted from the
          127  +library. Attempting to execute an EXPLAIN statement will cause a parse
          128  +error.
          129  +</p>
          130  +
          131  +<p><b>SQLITE_OMIT_FLOATING_POINT</b><br>
          132  +This option is used to omit floating-point number support from the SQLite
          133  +library. When specified, specifying a floating point number as a literal 
          134  +(i.e. "1.01") results in a parse error.
          135  +</p>
          136  +<p>In the future, this option may also disable other floating point 
          137  +functionality, for example the sqlite3_result_double(), 
          138  +sqlite3_bind_double(), sqlite3_value_double() and sqlite3_column_double() 
          139  +API functions.
          140  +</p>
          141  +
          142  +<p><b>SQLITE_OMIT_FOREIGN_KEY</b><br>
          143  +If this option is defined, FOREIGN KEY clauses in column declarations are
          144  +ignored.
          145  +</p>
          146  +
          147  +<p><b>SQLITE_OMIT_INTEGRITY_CHECK</b><br>
          148  +This option may be used to omit the 
          149  +<a href="pragma.html#pragma_integrity_check">"PRAGMA integrity_check"</a> 
          150  +command from the compiled library.
          151  +</p>
          152  +
          153  +<p><b>SQLITE_OMIT_MEMORYDB</b><br>
          154  +When this is defined, the library does not respect the special database
          155  +name ":memory:" (normally used to create an in-memory database). If 
          156  +":memory:" is passed to sqlite3_open(), a file with this name will be 
          157  +opened or created.
          158  +</p>
          159  +
          160  +<p><b>SQLITE_OMIT_PAGER_PRAGMAS</b><br>
          161  +Defining this option omits pragmas related to the pager subsystem from 
          162  +the build. Currently, the 
          163  +<a href="pragma.html#pragma_default_cache_size">default_cache_size</a> and 
          164  +<a href="pragma.html#pragma_cache_size">cache_size</a> pragmas are omitted.
          165  +</p>
          166  +
          167  +<p><b>SQLITE_OMIT_PRAGMA</b><br>
          168  +This option is used to omit the <a href="pragma.html">PRAGMA command</a> 
          169  +from the library. Note that it is useful to define the macros that omit
          170  +specific pragmas in addition to this, as they may also remove supporting code
          171  +in other sub-systems. This macro removes the PRAGMA command only.
          172  +</p>
          173  +
          174  +<p><b>SQLITE_OMIT_PROGRESS_CALLBACK</b><br>
          175  +This option may be defined to omit the capability to issue "progress" 
          176  +callbacks during long-running SQL statements. The 
          177  +<a href="capi3ref.html#sqlite3_progress_handler">sqlite3_progress_handler()</a>
          178  +API function is not present in the library.
          179  +
          180  +<p><b>SQLITE_OMIT_REINDEX</b><br>
          181  +When this option is defined, the <a href="lang_reindex.html">REINDEX</a> 
          182  +command is not included in the library. Executing a REINDEX statement causes 
          183  +a parse error.
          184  +
          185  +<p><i>TODO: Need a link here - REINDEX is not documented yet</i><p>
          186  +
          187  +<p><b>SQLITE_OMIT_SCHEMA_PRAGMAS</b><br>
          188  +Defining this option omits pragmas for querying the database schema from 
          189  +the build. Currently, the 
          190  +<a href="pragma.html#pragma_table_info">table_info</a>,
          191  +<a href="pragma.html#pragma_index_info">index_info</a>,
          192  +<a href="pragma.html#pragma_index_list">index_list</a> and
          193  +<a href="pragma.html#pragma_database_list">database_list</a>
          194  +pragmas are omitted.
          195  +</p>
          196  +
          197  +<p><b>SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS</b><br>
          198  +Defining this option omits pragmas for querying the database schema from 
          199  +the build. Currently, the 
          200  +<a href="pragma.html#pragma_table_info">table_info</a>,
          201  +<a href="pragma.html#pragma_index_info">index_info</a>,
          202  +<a href="pragma.html#pragma_index_list">index_list</a> and
          203  +<a href="pragma.html#pragma_database_list">database_list</a>
          204  +pragmas are omitted.
          205  +</p>
          206  +
          207  +<p><b>SQLITE_OMIT_TCL_VARIABLE</b><br>
          208  +<i>Document me!</i></p>
          209  +
          210  +<p><b>SQLITE_OMIT_TRIGGER</b><br>
          211  +<i>Document me!</i></p>
          212  +
          213  +<p><b>SQLITE_OMIT_UTF16</b><br>
          214  +<i>Document me!</i></p>
          215  +
          216  +<p><b>SQLITE_OMIT_VACUUM</b><br>
          217  +When this option is defined, the <a href="lang_vacuum.html">VACUUM</a> 
          218  +command is not included in the library. Executing a VACUUM statement causes 
          219  +a parse error.
          220  +</p>
          221  +
          222  +<p><b>SQLITE_OMIT_VIEW</b><br>
          223  +<i>Document me!</i></p>
          224  +}
          225  +footer $rcsid
          226  +

Changes to www/docs.tcl.

     1      1   # This script generates the "docs.html" page that describes various
     2      2   # sources of documentation available for SQLite.
     3      3   #
     4         -set rcsid {$Id: docs.tcl,v 1.7 2004/11/10 05:48:57 danielk1977 Exp $}
            4  +set rcsid {$Id: docs.tcl,v 1.8 2004/11/20 06:05:56 danielk1977 Exp $}
     5      5   source common.tcl
     6      6   header {SQLite Documentation}
     7      7   puts {
     8      8   <h2>Available Documentation</h2>
     9      9   <table width="100%" cellpadding="5">
    10     10   }
    11     11   
................................................................................
   105    105   
   106    106   doc {VDBE Opcodes} {opcode.html} {
   107    107     This document is an automatically generated description of the various
   108    108     opcodes that the VDBE understands.  Programmers can use this document as
   109    109     a reference to better understand the output of EXPLAIN listings from
   110    110     SQLite.
   111    111   }
          112  +
          113  +doc {Compilation Options} {compile.html} {
          114  +  This document describes the compile time options that may be set to 
          115  +  modify the default behaviour of the library or omit optional features
          116  +  in order to reduce binary size.
          117  +}
   112    118   
   113    119   puts {</table>}
   114    120   footer $rcsid

Changes to www/pragma.tcl.

     1      1   #
     2      2   # Run this Tcl script to generate the pragma.html file.
     3      3   #
     4         -set rcsid {$Id: pragma.tcl,v 1.4 2004/11/19 11:59:24 danielk1977 Exp $}
            4  +set rcsid {$Id: pragma.tcl,v 1.5 2004/11/20 06:05:56 danielk1977 Exp $}
     5      5   source common.tcl
     6      6   header {Pragma statements supported by SQLite}
     7      7   
     8      8   proc Section {name {label {}}} {
     9      9     puts "\n<hr />"
    10     10     if {$label!=""} {
    11     11       puts "<a name=\"$label\"></a>"
................................................................................
   289    289   </ul>
   290    290   }
   291    291   
   292    292   Section {Pragmas to debug the library} debug
   293    293   
   294    294   puts {
   295    295   <ul>
          296  +<a name="pragma_integrity_check"></a>
   296    297   <li><p><b>PRAGMA integrity_check;</b></p>
   297    298       <p>The command does an integrity check of the entire database.  It
   298    299       looks for out-of-order records, missing pages, malformed records, and
   299    300       corrupt indices.
   300    301       If any problems are found, then a single string is returned which is
   301    302       a description of all problems.  If everything is in order, "ok" is
   302    303       returned.</p></li>
   303    304   
          305  +<a name="pragma_parser_trace"></a>
   304    306   <li><p><b>PRAGMA parser_trace = ON; </b>(1)<b>
   305    307       <br>PRAGMA parser_trace = OFF;</b> (0)</p>
   306    308       <p>Turn tracing of the SQL parser inside of the
   307    309       SQLite library on and off.  This is used for debugging.
   308    310       This only works if the library is compiled without the NDEBUG macro.
   309    311       </p></li>
   310    312