Small. Fast. Reliable.
Choose any three.

High-Level Requirements for SQLite

H10010The sqlite3.h header file shall define the the following interfaces:
#define SQLITE_VERSION         "3.6.2"
#define SQLITE_VERSION_NUMBER  3006002

H10011The SQLITE_VERSION #define in the sqlite3.h header file shall evaluate to a string literal that is the SQLite version with which the header file is associated.
H10014The SQLITE_VERSION_NUMBER #define shall resolve to an integer with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z are the major version, minor version, and release number.
H10020The sqlite3.h header file shall define the the following interfaces:
SQLITE_EXTERN const char sqlite3_version[];
const char *sqlite3_libversion(void);
int sqlite3_libversion_number(void);

H10021The sqlite3_libversion_number() interface shall return an integer equal to SQLITE_VERSION_NUMBER.
H10022The sqlite3_version string constant shall contain the text of the SQLITE_VERSION string.
H10023The sqlite3_libversion() function shall return a pointer to the sqlite3_version string constant.
H10100The sqlite3.h header file shall define the the following interfaces:
int sqlite3_threadsafe(void);

H10101The sqlite3_threadsafe() function shall return nonzero if SQLite was compiled with the its mutexes enabled by default or zero if SQLite was compiled such that mutexes are permanently disabled.
H10102The value returned by the sqlite3_threadsafe() function shall not change when mutex setting are modified at runtime using the sqlite3_config() interface and especially the SQLITE_CONFIG_SINGLETHREAD, SQLITE_CONFIG_MULTITHREAD, SQLITE_CONFIG_SERIALIZED, and SQLITE_CONFIG_MUTEX verbs.
H10130The sqlite3.h header file shall define the the following interfaces:
int sqlite3_initialize(void);
int sqlite3_shutdown(void);
int sqlite3_os_init(void);
int sqlite3_os_end(void);

H10145The sqlite3.h header file shall define the the following interfaces:
int sqlite3_config(int, ...);

H10155The sqlite3.h header file shall define the the following interfaces:
typedef struct sqlite3_mem_methods sqlite3_mem_methods;
struct sqlite3_mem_methods {
  void *(*xMalloc)(int);         /* Memory allocation function */
  void (*xFree)(void*);          /* Free a prior allocation */
  void *(*xRealloc)(void*,int);  /* Resize an allocation */
  int (*xSize)(void*);           /* Return the size of an allocation */
  int (*xRoundup)(int);          /* Round up request size to allocation size */
  int (*xInit)(void*);           /* Initialize the memory allocator */
  void (*xShutdown)(void*);      /* Deinitialize the memory allocator */
  void *pAppData;                /* Argument to xInit() and xShutdown() */
};

H10160The sqlite3.h header file shall define the the following interfaces:
#define SQLITE_CONFIG_SINGLETHREAD  1  /* nil */
#define SQLITE_CONFIG_MULTITHREAD   2  /* nil */
#define SQLITE_CONFIG_SERIALIZED    3  /* nil */
#define SQLITE_CONFIG_MALLOC        4  /* sqlite3_mem_methods* */
#define SQLITE_CONFIG_GETMALLOC     5  /* sqlite3_mem_methods* */
#define SQLITE_CONFIG_SCRATCH       6  /* void*, int sz, int N */
#define SQLITE_CONFIG_PAGECACHE     7  /* void*, int sz, int N */
#define SQLITE_CONFIG_HEAP          8  /* void*, int nByte, int min */
#define SQLITE_CONFIG_MEMSTATUS     9  /* boolean */
#define SQLITE_CONFIG_MUTEX        10  /* sqlite3_mutex_methods* */
#define SQLITE_CONFIG_GETMUTEX     11  /* sqlite3_mutex_methods* */
#define SQLITE_CONFIG_CHUNKALLOC   12  /* int threshold */
#define SQLITE_CONFIG_LOOKASIDE    13  /* int int */

H10170The sqlite3.h header file shall define the the following interfaces:
#define SQLITE_DBCONFIG_LOOKASIDE    1001  /* void* int int */

H10180The sqlite3.h header file shall define the the following interfaces:
int sqlite3_db_config(sqlite3*, int op, ...);

H10200The sqlite3.h header file shall define the the following interfaces:
#ifdef SQLITE_INT64_TYPE
  typedef SQLITE_INT64_TYPE sqlite_int64;
  typedef unsigned SQLITE_INT64_TYPE sqlite_uint64;
#elif defined(_MSC_VER) || defined(__BORLANDC__)
  typedef __int64 sqlite_int64;
  typedef unsigned __int64 sqlite_uint64;
#else
  typedef long long int sqlite_int64;
  typedef unsigned long long int sqlite_uint64;
#endif
typedef sqlite_int64 sqlite3_int64;
typedef sqlite_uint64 sqlite3_uint64;

H10201The sqlite_int64 and sqlite3_int64 type shall specify a 64-bit signed integer.
H10202The sqlite_uint64 and sqlite3_uint64 type shall specify a 64-bit unsigned integer.
H10210The sqlite3.h header file shall define the the following interfaces:
#define SQLITE_OK           0   /* Successful result */
/* beginning-of-error-codes */
#define SQLITE_ERROR        1   /* SQL error or missing database */
#define SQLITE_INTERNAL     2   /* Internal logic error in SQLite */
#define SQLITE_PERM         3   /* Access permission denied */
#define SQLITE_ABORT        4   /* Callback routine requested an abort */
#define SQLITE_BUSY         5   /* The database file is locked */
#define SQLITE_LOCKED       6   /* A table in the database is locked */
#define SQLITE_NOMEM        7   /* A malloc() failed */
#define SQLITE_READONLY     8   /* Attempt to write a readonly database */
#define SQLITE_INTERRUPT    9   /* Operation terminated by sqlite3_interrupt()*/
#define SQLITE_IOERR       10   /* Some kind of disk I/O error occurred */
#define SQLITE_CORRUPT     11   /* The database disk image is malformed */
#define SQLITE_NOTFOUND    12   /* NOT USED. Table or record not found */
#define SQLITE_FULL        13   /* Insertion failed because database is full */
#define SQLITE_CANTOPEN    14   /* Unable to open the database file */
#define SQLITE_PROTOCOL    15   /* NOT USED. Database lock protocol error */
#define SQLITE_EMPTY       16   /* Database is empty */
#define SQLITE_SCHEMA      17   /* The database schema changed */
#define SQLITE_TOOBIG      18   /* String or BLOB exceeds size limit */
#define SQLITE_CONSTRAINT  19   /* Abort due to constraint violation */
#define SQLITE_MISMATCH    20   /* Data type mismatch */
#define SQLITE_MISUSE      21   /* Library used incorrectly */
#define SQLITE_NOLFS       22   /* Uses OS features not supported on host */
#define SQLITE_AUTH        23   /* Authorization denied */
#define SQLITE_FORMAT      24   /* Auxiliary database format error */
#define SQLITE_RANGE       25   /* 2nd parameter to sqlite3_bind out of range */
#define SQLITE_NOTADB      26   /* File opened that is not a database file */
#define SQLITE_ROW         100  /* sqlite3_step() has another row ready */
#define SQLITE_DONE        101  /* sqlite3_step() has finished executing */
/* end-of-error-codes */

H10220The sqlite3.h header file shall define the the following interfaces:
#define SQLITE_IOERR_READ              (SQLITE_IOERR | (1<<8))
#define SQLITE_IOERR_SHORT_READ        (SQLITE_IOERR | (2<<8))
#define SQLITE_IOERR_WRITE             (SQLITE_IOERR | (3<<8))
#define SQLITE_IOERR_FSYNC             (SQLITE_IOERR | (4<<8))
#define SQLITE_IOERR_DIR_FSYNC         (SQLITE_IOERR | (5<<8))
#define SQLITE_IOERR_TRUNCATE          (SQLITE_IOERR | (6<<8))
#define SQLITE_IOERR_FSTAT             (SQLITE_IOERR | (7<<8))
#define SQLITE_IOERR_UNLOCK            (SQLITE_IOERR | (8<<8))
#define SQLITE_IOERR_RDLOCK            (SQLITE_IOERR | (9<<8))
#define SQLITE_IOERR_DELETE            (SQLITE_IOERR | (10<<8))
#define SQLITE_IOERR_BLOCKED           (SQLITE_IOERR | (11<<8))
#define SQLITE_IOERR_NOMEM             (SQLITE_IOERR | (12<<8))
#define SQLITE_IOERR_ACCESS            (SQLITE_IOERR | (13<<8))
#define SQLITE_IOERR_CHECKRESERVEDLOCK (SQLITE_IOERR | (14<<8))
#define SQLITE_IOERR_LOCK              (SQLITE_IOERR | (15<<8))

H10223The symbolic name for an extended result code shall contains a related primary result code as a prefix.
H10224Primary result code names shall contain a single "_" character.
H10225Extended result code names shall contain two or more "_" characters.
H10226The numeric value of an extended result code shall contain the numeric value of its corresponding primary result code in its least significant 8 bits.
H10230The sqlite3.h header file shall define the the following interfaces:
#define SQLITE_OPEN_READONLY         0x00000001
#define SQLITE_OPEN_READWRITE        0x00000002
#define SQLITE_OPEN_CREATE           0x00000004
#define SQLITE_OPEN_DELETEONCLOSE    0x00000008
#define SQLITE_OPEN_EXCLUSIVE        0x00000010
#define SQLITE_OPEN_MAIN_DB          0x00000100
#define SQLITE_OPEN_TEMP_DB          0x00000200
#define SQLITE_OPEN_TRANSIENT_DB     0x00000400
#define SQLITE_OPEN_MAIN_JOURNAL     0x00000800
#define SQLITE_OPEN_TEMP_JOURNAL     0x00001000
#define SQLITE_OPEN_SUBJOURNAL       0x00002000
#define SQLITE_OPEN_MASTER_JOURNAL   0x00004000
#define SQLITE_OPEN_NOMUTEX          0x00008000
#define SQLITE_OPEN_FULLMUTEX        0x00010000

H10240The sqlite3.h header file shall define the the following interfaces:
#define SQLITE_IOCAP_ATOMIC          0x00000001
#define SQLITE_IOCAP_ATOMIC512       0x00000002
#define SQLITE_IOCAP_ATOMIC1K        0x00000004
#define SQLITE_IOCAP_ATOMIC2K        0x00000008
#define SQLITE_IOCAP_ATOMIC4K        0x00000010
#define SQLITE_IOCAP_ATOMIC8K        0x00000020
#define SQLITE_IOCAP_ATOMIC16K       0x00000040
#define SQLITE_IOCAP_ATOMIC32K       0x00000080
#define SQLITE_IOCAP_ATOMIC64K       0x00000100
#define SQLITE_IOCAP_SAFE_APPEND     0x00000200
#define SQLITE_IOCAP_SEQUENTIAL      0x00000400

H10250The sqlite3.h header file shall define the the following interfaces:
#define SQLITE_LOCK_NONE          0
#define SQLITE_LOCK_SHARED        1
#define SQLITE_LOCK_RESERVED      2
#define SQLITE_LOCK_PENDING       3
#define SQLITE_LOCK_EXCLUSIVE     4

H10260The sqlite3.h header file shall define the the following interfaces:
#define SQLITE_SYNC_NORMAL        0x00002
#define SQLITE_SYNC_FULL          0x00003
#define SQLITE_SYNC_DATAONLY      0x00010

H10265The sqlite3.h header file shall define the the following interfaces:
#define SQLITE_INTEGER  1
#define SQLITE_FLOAT    2
#define SQLITE_BLOB     4
#define SQLITE_NULL     5
#ifdef SQLITE_TEXT
# undef SQLITE_TEXT
#else
# define SQLITE_TEXT     3
#endif
#define SQLITE3_TEXT     3

H10267The sqlite3.h header file shall define the the following interfaces:
#define SQLITE_UTF8           1
#define SQLITE_UTF16LE        2
#define SQLITE_UTF16BE        3
#define SQLITE_UTF16          4    /* Use native byte order */
#define SQLITE_ANY            5    /* sqlite3_create_function only */
#define SQLITE_UTF16_ALIGNED  8    /* sqlite3_create_collation only */

H10280The sqlite3.h header file shall define the the following interfaces:
typedef void (*sqlite3_destructor_type)(void*);
#define SQLITE_STATIC      ((sqlite3_destructor_type)0)
#define SQLITE_TRANSIENT   ((sqlite3_destructor_type)-1)

H10310The sqlite3.h header file shall define the the following interfaces:
SQLITE_EXTERN char *sqlite3_temp_directory;

H10330The sqlite3.h header file shall define the the following interfaces:
int sqlite3_enable_shared_cache(int);

H10331A successful invocation of sqlite3_enable_shared_cache(B) will enable or disable shared cache mode for any subsequently created database connection in the same process.
H10336When shared cache is enabled, the sqlite3_create_module() interface will always return an error.
H10337The sqlite3_enable_shared_cache(B) interface returns SQLITE_OK if shared cache was enabled or disabled successfully.
H10339Shared cache is disabled by default.
H10510The sqlite3.h header file shall define the the following interfaces:
int sqlite3_complete(const char *sql);
int sqlite3_complete16(const void *sql);

H10511A successful evaluation of sqlite3_complete() or sqlite3_complete16() functions shall return a numeric 1 if and only if the last non-whitespace token in their input is a semicolon that is not in between the BEGIN and END of a CREATE TRIGGER statement.
H10512If a memory allocation error occurs during an invocation of sqlite3_complete() or sqlite3_complete16() then the routine shall return SQLITE_NOMEM.
H10530The sqlite3.h header file shall define the the following interfaces:
int sqlite3_sleep(int);

H10533The sqlite3_sleep(M) interface invokes the xSleep method of the default VFS in order to suspend execution of the current thread for at least M milliseconds.
H10536The sqlite3_sleep(M) interface returns the number of milliseconds of sleep actually requested of the operating system, which might be larger than the parameter M.
H11110The sqlite3.h header file shall define the the following interfaces:
typedef struct sqlite3_file sqlite3_file;
struct sqlite3_file {
  const struct sqlite3_io_methods *pMethods;  /* Methods for an open file */
};

H11120The sqlite3.h header file shall define the the following interfaces:
typedef struct sqlite3_io_methods sqlite3_io_methods;
struct sqlite3_io_methods {
  int iVersion;
  int (*xClose)(sqlite3_file*);
  int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst);
  int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst);
  int (*xTruncate)(sqlite3_file*, sqlite3_int64 size);
  int (*xSync)(sqlite3_file*, int flags);
  int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize);
  int (*xLock)(sqlite3_file*, int);
  int (*xUnlock)(sqlite3_file*, int);
  int (*xCheckReservedLock)(sqlite3_file*, int *pResOut);
  int (*xFileControl)(sqlite3_file*, int op, void *pArg);
  int (*xSectorSize)(sqlite3_file*);
  int (*xDeviceCharacteristics)(sqlite3_file*);
  /* Additional methods may be added in future releases */
};

H11140The sqlite3.h header file shall define the the following interfaces:
typedef struct sqlite3_vfs sqlite3_vfs;
struct sqlite3_vfs {
  int iVersion;            /* Structure version number */
  int szOsFile;            /* Size of subclassed sqlite3_file */
  int mxPathname;          /* Maximum file pathname length */
  sqlite3_vfs *pNext;      /* Next registered VFS */
  const char *zName;       /* Name of this virtual file system */
  void *pAppData;          /* Pointer to application-specific data */
  int (*xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*,
               int flags, int *pOutFlags);
  int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir);
  int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut);
  int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut);
  void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename);
  void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg);
  void *(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol);
  void (*xDlClose)(sqlite3_vfs*, void*);
  int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut);
  int (*xSleep)(sqlite3_vfs*, int microseconds);
  int (*xCurrentTime)(sqlite3_vfs*, double*);
  int (*xGetLastError)(sqlite3_vfs*, int, char *);
  /* New fields may be appended in figure versions.  The iVersion
  ** value will increment whenever this happens. */
};

H11190The sqlite3.h header file shall define the the following interfaces:
#define SQLITE_ACCESS_EXISTS    0
#define SQLITE_ACCESS_READWRITE 1
#define SQLITE_ACCESS_READ      2

H11200The sqlite3.h header file shall define the the following interfaces:
sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName);
int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
int sqlite3_vfs_unregister(sqlite3_vfs*);

H11203The sqlite3_vfs_find(N) interface returns a pointer to the registered sqlite3_vfs object whose name exactly matches the zero-terminated UTF-8 string N, or it returns NULL if there is no match.
H11206If the N parameter to sqlite3_vfs_find(N) is NULL then the function returns a pointer to the default sqlite3_vfs object if there is one, or NULL if there is no default sqlite3_vfs object.
H11209The sqlite3_vfs_register(P,F) interface registers the well-formed sqlite3_vfs object P using the name given by the zName field of the object.
H11212Using the sqlite3_vfs_register(P,F) interface to register the same sqlite3_vfs object multiple times is a harmless no-op.
H11215The sqlite3_vfs_register(P,F) interface makes the sqlite3_vfs object P the default sqlite3_vfs object if F is non-zero.
H11218The sqlite3_vfs_unregister(P) interface unregisters the sqlite3_vfs object P so that it is no longer returned by subsequent calls to sqlite3_vfs_find().
H11300The sqlite3.h header file shall define the the following interfaces:
int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);

H11302The sqlite3_finalize(S) interface destroys the prepared statement S and releases all memory and file resources held by that object.
H11304If the most recent call to sqlite3_step(S) for the prepared statement S returned an error, then sqlite3_finalize(S) returns that same error.
H11310The sqlite3.h header file shall define the the following interfaces:
#define SQLITE_FCNTL_LOCKSTATE        1

H11400The sqlite3.h header file shall define the the following interfaces:
int sqlite3_test_control(int op, ...);

H11410The sqlite3.h header file shall define the the following interfaces:
#define SQLITE_TESTCTRL_PRNG_SAVE                5
#define SQLITE_TESTCTRL_PRNG_RESTORE             6
#define SQLITE_TESTCTRL_PRNG_RESET               7
#define SQLITE_TESTCTRL_BITVEC_TEST              8
#define SQLITE_TESTCTRL_FAULT_INSTALL            9
#define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS     10

H12000The sqlite3.h header file shall define the the following interfaces:
typedef struct sqlite3 sqlite3;

H12010The sqlite3.h header file shall define the the following interfaces:
int sqlite3_close(sqlite3 *);

H12011A successful call to sqlite3_close(C) shall destroy the database connection object C.
H12012A successful call to sqlite3_close(C) shall return SQLITE_OK.
H12013A successful call to sqlite3_close(C) shall release all memory and system resources associated with database connection C.
H12014A call to sqlite3_close(C) on a database connection C that has one or more open prepared statements shall fail with an SQLITE_BUSY error code.
H12015A call to sqlite3_close(C) where C is a NULL pointer shall return SQLITE_OK.
H12019When sqlite3_close(C) is invoked on a database connection C that has a pending transaction, the transaction shall be rolled back.
H12100The sqlite3.h header file shall define the the following interfaces:
int sqlite3_exec(
  sqlite3*,                                  /* An open database */
  const char *sql,                           /* SQL to be evaluated */
  int (*callback)(void*,int,char**,char**),  /* Callback function */
  void *,                                    /* 1st argument to callback */
  char **errmsg                              /* Error msg written here */
);

H12101A successful invocation of sqlite3_exec(D,S,C,A,E) shall sequentially evaluate all of the UTF-8 encoded, semicolon-separated SQL statements in the zero-terminated string S within the context of the database connection D.
H12102If the S parameter to sqlite3_exec(D,S,C,A,E) is NULL then the actions of the interface shall be the same as if the S parameter were an empty string.
H12104The return value of sqlite3_exec() shall be SQLITE_OK if all SQL statements run successfully and to completion.
H12105The return value of sqlite3_exec() shall be an appropriate non-zero error code if any SQL statement fails.
H12107If one or more of the SQL statements handed to sqlite3_exec() return results and the 3rd parameter is not NULL, then the callback function specified by the 3rd parameter shall be invoked once for each row of result.
H12110If the callback returns a non-zero value then sqlite3_exec() shall abort the SQL statement it is currently evaluating, skip all subsequent SQL statements, and return SQLITE_ABORT.
H12113The sqlite3_exec() routine shall pass its 4th parameter through as the 1st parameter of the callback.
H12116The sqlite3_exec() routine shall set the 2nd parameter of its callback to be the number of columns in the current row of result.
H12119The sqlite3_exec() routine shall set the 3rd parameter of its callback to be an array of pointers to strings holding the values for each column in the current result set row as obtained from sqlite3_column_text().
H12122The sqlite3_exec() routine shall set the 4th parameter of its callback to be an array of pointers to strings holding the names of result columns as obtained from sqlite3_column_name().
H12125If the 3rd parameter to sqlite3_exec() is NULL then sqlite3_exec() shall silently discard query results.
H12131If an error occurs while parsing or evaluating any of the SQL statements in the S parameter of sqlite3_exec(D,S,C,A,E) and if the E parameter is not NULL, then sqlite3_exec() shall store in *E an appropriate error message written into memory obtained from sqlite3_malloc().
H12134The sqlite3_exec(D,S,C,A,E) routine shall set the value of *E to NULL if E is not NULL and there are no errors.
H12137The sqlite3_exec(D,S,C,A,E) function shall set the error code and message accessible via sqlite3_errcode(), sqlite3_errmsg(), and sqlite3_errmsg16().
H12138If the S parameter to sqlite3_exec(D,S,C,A,E) is NULL or an empty string or contains nothing other than whitespace, comments, and/or semicolons, then results of sqlite3_errcode(), sqlite3_errmsg(), and sqlite3_errmsg16() shall reset to indicate no errors.
H12200The sqlite3.h header file shall define the the following interfaces:
int sqlite3_extended_result_codes(sqlite3*, int onoff);

H12201Each new database connection shall have the extended result codes feature disabled by default.
H12202The sqlite3_extended_result_codes(D,F) interface shall enable extended result codes for the database connection D if the F parameter is true, or disable them if F is false.
H12220The sqlite3.h header file shall define the the following interfaces:
sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);

H12221The sqlite3_last_insert_rowid() function returns the rowid of the most recent successful INSERT performed on the same database connection and within the same or higher level trigger context, or zero if there have been no qualifying inserts.
H12223The sqlite3_last_insert_rowid() function returns the same value when called from the same trigger context immediately before and after a ROLLBACK.
H12240The sqlite3.h header file shall define the the following interfaces:
int sqlite3_changes(sqlite3*);

H12241The sqlite3_changes() function shall return the number of row changes caused by the most recent INSERT, UPDATE, or DELETE statement on the same database connection and within the same or higher trigger context, or zero if there have not been any qualifying row changes.
H12243Statements of the form "DELETE FROM tablename" with no WHERE clause shall cause subsequent calls to sqlite3_changes() to return zero, regardless of the number of rows originally in the table.
H12260The sqlite3.h header file shall define the the following interfaces:
int sqlite3_total_changes(sqlite3*);

H12261The sqlite3_total_changes() returns the total number of row changes caused by INSERT, UPDATE, and/or DELETE statements on the same database connection, in any trigger context, since the database connection was created.
H12263Statements of the form "DELETE FROM tablename" with no WHERE clause shall not change the value returned by sqlite3_total_changes().
H12270The sqlite3.h header file shall define the the following interfaces:
void sqlite3_interrupt(sqlite3*);

H12271The sqlite3_interrupt() interface will force all running SQL statements associated with the same database connection to halt after processing at most one additional row of data.
H12272Any SQL statement that is interrupted by sqlite3_interrupt() will return SQLITE_INTERRUPT.
H12280The sqlite3.h header file shall define the the following interfaces:
void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*);
void *sqlite3_profile(sqlite3*,
   void(*xProfile)(void*,const char*,sqlite3_uint64), void*);

H12281The callback function registered by sqlite3_trace() shall be invoked whenever an SQL statement first begins to execute and whenever a trigger subprogram first begins to run.
H12282Each call to sqlite3_trace() shall override the previously registered trace callback.
H12283A NULL trace callback shall disable tracing.
H12284The first argument to the trace callback shall be a copy of the pointer which was the 3rd argument to sqlite3_trace().
H12285The second argument to the trace callback is a zero-terminated UTF-8 string containing the original text of the SQL statement as it was passed into sqlite3_prepare_v2() or the equivalent, or an SQL comment indicating the beginning of a trigger subprogram.
H12287The callback function registered by sqlite3_profile() is invoked as each SQL statement finishes.
H12288The first parameter to the profile callback is a copy of the 3rd parameter to sqlite3_profile().
H12289The second parameter to the profile callback is a zero-terminated UTF-8 string that contains the complete text of the SQL statement as it was processed by sqlite3_prepare_v2() or the equivalent.
H12290The third parameter to the profile callback is an estimate of the number of nanoseconds of wall-clock time required to run the SQL statement from start to finish.
H12310The sqlite3.h header file shall define the the following interfaces:
int sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*);

H12311The sqlite3_busy_handler(D,C,A) function shall replace busy callback in the database connection D with a new a new busy handler C and application data pointer A.
H12312Newly created database connections shall have a busy handler of NULL.
H12314When two or more database connections share a common cache, the busy handler for the database connection currently using the cache shall be invoked when the cache encounters a lock.
H12316If a busy handler callback returns zero, then the SQLite interface that provoked the locking event shall return SQLITE_BUSY.
H12318SQLite shall invokes the busy handler with two arguments which are a copy of the pointer supplied by the 3rd parameter to sqlite3_busy_handler() and a count of the number of prior invocations of the busy handler for the same locking event.
H12340The sqlite3.h header file shall define the the following interfaces:
int sqlite3_busy_timeout(sqlite3*, int ms);

H12341The sqlite3_busy_timeout() function shall override any prior sqlite3_busy_timeout() or sqlite3_busy_handler() setting on the same database connection.
H12343If the 2nd parameter to sqlite3_busy_timeout() is less than or equal to zero, then the busy handler shall be cleared so that all subsequent locking events immediately return SQLITE_BUSY.
H12344If the 2nd parameter to sqlite3_busy_timeout() is a positive number N, then a busy handler shall be set that repeatedly calls the xSleep() method in the VFS interface until either the lock clears or until the cumulative sleep time reported back by xSleep() exceeds N milliseconds.
H12370The sqlite3.h header file shall define the the following interfaces:
int sqlite3_get_table(
  sqlite3 *db,          /* An open database */
  const char *zSql,     /* SQL to be evaluated */
  char ***pazResult,    /* Results of the query */
  int *pnRow,           /* Number of result rows written here */
  int *pnColumn,        /* Number of result columns written here */
  char **pzErrmsg       /* Error msg written here */
);
void sqlite3_free_table(char **result);

H12371If a sqlite3_get_table() fails a memory allocation, then it shall free the result table under construction, abort the query in process, skip any subsequent queries, set the *pazResult output pointer to NULL and return SQLITE_NOMEM.
H12373If the pnColumn parameter to sqlite3_get_table() is not NULL then a successful invocation of sqlite3_get_table() shall write the number of columns in the result set of the query into *pnColumn.
H12374If the pnRow parameter to sqlite3_get_table() is not NULL then a successful invocation of sqlite3_get_table() shall writes the number of rows in the result set of the query into *pnRow.
H12376A successful invocation of sqlite3_get_table() that computes N rows of result with C columns per row shall make *pazResult point to an array of pointers to (N+1)*C strings where the first C strings are column names as obtained from sqlite3_column_name() and the rest are column result values obtained from sqlite3_column_text().
H12379The values in the pazResult array returned by sqlite3_get_table() shall remain valid until cleared by sqlite3_free_table().
H12382When an error occurs during evaluation of sqlite3_get_table() the function shall set *pazResult to NULL, write an error message into memory obtained from sqlite3_malloc(), make **pzErrmsg point to that error message, and return a appropriate error code.
H12500The sqlite3.h header file shall define the the following interfaces:
int sqlite3_set_authorizer(
  sqlite3*,
  int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
  void *pUserData
);

H12501The sqlite3_set_authorizer(D,...) interface registers a authorizer callback with database connection D.
H12502The authorizer callback is invoked as SQL statements are being parseed and compiled.
H12503If the authorizer callback returns any value other than SQLITE_IGNORE, SQLITE_OK, or SQLITE_DENY, then the application interface call that caused the authorizer callback to run shall fail with an SQLITE_ERROR error code and an appropriate error message.
H12504When the authorizer callback returns SQLITE_OK, the operation described is processed normally.
H12505When the authorizer callback returns SQLITE_DENY, the application interface call that caused the authorizer callback to run shall fail with an SQLITE_ERROR error code and an error message explaining that access is denied.
H12506If the authorizer code (the 2nd parameter to the authorizer callback) is SQLITE_READ and the authorizer callback returns SQLITE_IGNORE, then the prepared statement is constructed to insert a NULL value in place of the table column that would have been read if SQLITE_OK had been returned.
H12507If the authorizer code (the 2nd parameter to the authorizer callback) is anything other than SQLITE_READ, then a return of SQLITE_IGNORE has the same effect as SQLITE_DENY.
H12510The first parameter to the authorizer callback is a copy of the third parameter to the sqlite3_set_authorizer() interface.
H12511The second parameter to the callback is an integer action code that specifies the particular action to be authorized.
H12512The third through sixth parameters to the callback are zero-terminated strings that contain additional details about the action to be authorized.
H12520Each call to sqlite3_set_authorizer() overrides any previously installed authorizer.
H12521A NULL authorizer means that no authorization callback is invoked.
H12522The default authorizer is NULL.
H12550The sqlite3.h header file shall define the the following interfaces:
/******************************************* 3rd ************ 4th ***********/
#define SQLITE_CREATE_INDEX          1   /* Index Name      Table Name      */
#define SQLITE_CREATE_TABLE          2   /* Table Name      NULL            */
#define SQLITE_CREATE_TEMP_INDEX     3   /* Index Name      Table Name      */
#define SQLITE_CREATE_TEMP_TABLE     4   /* Table Name      NULL            */
#define SQLITE_CREATE_TEMP_TRIGGER   5   /* Trigger Name    Table Name      */
#define SQLITE_CREATE_TEMP_VIEW      6   /* View Name       NULL            */
#define SQLITE_CREATE_TRIGGER        7   /* Trigger Name    Table Name      */
#define SQLITE_CREATE_VIEW           8   /* View Name       NULL            */
#define SQLITE_DELETE                9   /* Table Name      NULL            */
#define SQLITE_DROP_INDEX           10   /* Index Name      Table Name      */
#define SQLITE_DROP_TABLE           11   /* Table Name      NULL            */
#define SQLITE_DROP_TEMP_INDEX      12   /* Index Name      Table Name      */
#define SQLITE_DROP_TEMP_TABLE      13   /* Table Name      NULL            */
#define SQLITE_DROP_TEMP_TRIGGER    14   /* Trigger Name    Table Name      */
#define SQLITE_DROP_TEMP_VIEW       15   /* View Name       NULL            */
#define SQLITE_DROP_TRIGGER         16   /* Trigger Name    Table Name      */
#define SQLITE_DROP_VIEW            17   /* View Name       NULL            */
#define SQLITE_INSERT               18   /* Table Name      NULL            */
#define SQLITE_PRAGMA               19   /* Pragma Name     1st arg or NULL */
#define SQLITE_READ                 20   /* Table Name      Column Name     */
#define SQLITE_SELECT               21   /* NULL            NULL            */
#define SQLITE_TRANSACTION          22   /* NULL            NULL            */
#define SQLITE_UPDATE               23   /* Table Name      Column Name     */
#define SQLITE_ATTACH               24   /* Filename        NULL            */
#define SQLITE_DETACH               25   /* Database Name   NULL            */
#define SQLITE_ALTER_TABLE          26   /* Database Name   Table Name      */
#define SQLITE_REINDEX              27   /* Index Name      NULL            */
#define SQLITE_ANALYZE              28   /* Table Name      NULL            */
#define SQLITE_CREATE_VTABLE        29   /* Table Name      Module Name     */
#define SQLITE_DROP_VTABLE          30   /* Table Name      Module Name     */
#define SQLITE_FUNCTION             31   /* Function Name   NULL            */
#define SQLITE_COPY                  0   /* No longer used */

H12551The second parameter to an authorizer callback shall be an integer authorizer code that specifies what action is being authorized.
H12552The 3rd and 4th parameters to the authorization callback shall be parameters or NULL depending on which authorizer code is used as the second parameter.
H12553The 5th parameter to the authorizer callback shall be the name of the database (example: "main", "temp", etc.) if applicable.
H12554The 6th parameter to the authorizer callback shall be the name of the inner-most trigger or view that is responsible for the access attempt or NULL if this access attempt is directly from top-level SQL code.
H12590The sqlite3.h header file shall define the the following interfaces:
#define SQLITE_DENY   1   /* Abort the SQL statement with an error */
#define SQLITE_IGNORE 2   /* Don't allow access, but don't generate an error */

H12600The sqlite3.h header file shall define the the following interfaces:
int sqlite3_load_extension(
  sqlite3 *db,          /* Load the extension into this database connection */
  const char *zFile,    /* Name of the shared library containing extension */
  const char *zProc,    /* Entry point.  Derived from zFile if 0 */
  char **pzErrMsg       /* Put error message here if not 0 */
);

H12620The sqlite3.h header file shall define the the following interfaces:
int sqlite3_enable_load_extension(sqlite3 *db, int onoff);

H12640The sqlite3.h header file shall define the the following interfaces:
int sqlite3_auto_extension(void *xEntryPoint);

H12660The sqlite3.h header file shall define the the following interfaces:
void sqlite3_reset_auto_extension(void);

H12700The sqlite3.h header file shall define the the following interfaces:
int sqlite3_open(
  const char *filename,   /* Database filename (UTF-8) */
  sqlite3 **ppDb          /* OUT: SQLite db handle */
);
int sqlite3_open16(
  const void *filename,   /* Database filename (UTF-16) */
  sqlite3 **ppDb          /* OUT: SQLite db handle */
);
int sqlite3_open_v2(
  const char *filename,   /* Database filename (UTF-8) */
  sqlite3 **ppDb,         /* OUT: SQLite db handle */
  int flags,              /* Flags */
  const char *zVfs        /* Name of VFS module to use */
);

H12701The sqlite3_open(), sqlite3_open16(), and sqlite3_open_v2() interfaces create a new database connection associated with the database file given in their first parameter.
H12702The filename argument is interpreted as UTF-8 for sqlite3_open() and sqlite3_open_v2() and as UTF-16 in the native byte order for sqlite3_open16().
H12703A successful invocation of sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2() writes a pointer to a new database connection into *ppDb.
H12704The sqlite3_open(), sqlite3_open16(), and sqlite3_open_v2() interfaces return SQLITE_OK upon success, or an appropriate error code on failure.
H12706The default text encoding for a new database created using sqlite3_open() or sqlite3_open_v2() will be UTF-8.
H12707The default text encoding for a new database created using sqlite3_open16() will be UTF-16.
H12709The sqlite3_open(F,D) interface is equivalent to sqlite3_open_v2(F,D,G,0) where the G parameter is SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE.
H12711If the G parameter to sqlite3_open_v2(F,D,G,V) contains the bit value SQLITE_OPEN_READONLY then the database is opened for reading only.
H12712If the G parameter to sqlite3_open_v2(F,D,G,V) contains the bit value SQLITE_OPEN_READWRITE then the database is opened reading and writing if possible, or for reading only if the file is write protected by the operating system.
H12713If the G parameter to sqlite3_open_v2(F,D,G,V) omits the bit value SQLITE_OPEN_CREATE and the database does not previously exist, an error is returned.
H12714If the G parameter to sqlite3_open_v2(F,D,G,V) contains the bit value SQLITE_OPEN_CREATE and the database does not previously exist, then an attempt is made to create and initialize the database.
H12717If the filename argument to sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2() is ":memory:", then an private, ephemeral, in-memory database is created for the connection. Is SQLITE_OPEN_CREATE|SQLITE_OPEN_READWRITE required in sqlite3_open_v2()?
H12719If the filename is NULL or an empty string, then a private, ephemeral on-disk database will be created. Is SQLITE_OPEN_CREATE|SQLITE_OPEN_READWRITE required in sqlite3_open_v2()?
H12721The database connection created by sqlite3_open_v2(F,D,G,V) will use the sqlite3_vfs object identified by the V parameter, or the default sqlite3_vfs object if V is a NULL pointer.
H12723Two database connections will share a common cache if both were opened with the same VFS while shared cache mode was enabled and if both filenames compare equal using memcmp() after having been processed by the xFullPathname method of the VFS.
H12760The sqlite3.h header file shall define the the following interfaces:
int sqlite3_limit(sqlite3*, int id, int newVal);

H12762A successful call to sqlite3_limit(D,C,V) where V is positive changes the limit on the size of construct C in the database connection D to the lesser of V and the hard upper bound on the size of C that is set at compile-time.
H12766A successful call to sqlite3_limit(D,C,V) where V is negative leaves the state of the database connection D unchanged.
H12769A successful call to sqlite3_limit(D,C,V) returns the value of the limit on the size of construct C in the database connection D as it was prior to the call.
H12790The sqlite3.h header file shall define the the following interfaces:
#define SQLITE_LIMIT_LENGTH                    0
#define SQLITE_LIMIT_SQL_LENGTH                1
#define SQLITE_LIMIT_COLUMN                    2
#define SQLITE_LIMIT_EXPR_DEPTH                3
#define SQLITE_LIMIT_COMPOUND_SELECT           4
#define SQLITE_LIMIT_VDBE_OP                   5
#define SQLITE_LIMIT_FUNCTION_ARG              6
#define SQLITE_LIMIT_ATTACHED                  7
#define SQLITE_LIMIT_LIKE_PATTERN_LENGTH       8
#define SQLITE_LIMIT_VARIABLE_NUMBER           9

H12800The sqlite3.h header file shall define the the following interfaces:
int sqlite3_errcode(sqlite3 *db);
const char *sqlite3_errmsg(sqlite3*);
const void *sqlite3_errmsg16(sqlite3*);

H12801The sqlite3_errcode(D) interface returns the numeric result code or extended result code for the most recently failed interface call associated with the database connection D.
H12803The sqlite3_errmsg(D) and sqlite3_errmsg16(D) interfaces return English-language text that describes the error in the mostly recently failed interface call, encoded as either UTF-8 or UTF-16 respectively.
H12807The strings returned by sqlite3_errmsg() and sqlite3_errmsg16() are valid until the next SQLite interface call.
H12808Calls to API routines that do not return an error code (example: sqlite3_data_count()) do not change the error code or message returned by sqlite3_errcode(), sqlite3_errmsg(), or sqlite3_errmsg16().
H12809Interfaces that are not associated with a specific database connection (examples: sqlite3_mprintf() or sqlite3_enable_shared_cache() do not change the values returned by sqlite3_errcode(), sqlite3_errmsg(), or sqlite3_errmsg16().
H12850The sqlite3.h header file shall define the the following interfaces:
int sqlite3_table_column_metadata(
  sqlite3 *db,                /* Connection handle */
  const char *zDbName,        /* Database name or NULL */
  const char *zTableName,     /* Table name */
  const char *zColumnName,    /* Column name */
  char const **pzDataType,    /* OUTPUT: Declared data type */
  char const **pzCollSeq,     /* OUTPUT: Collation sequence name */
  int *pNotNull,              /* OUTPUT: True if NOT NULL constraint exists */
  int *pPrimaryKey,           /* OUTPUT: True if column part of PK */
  int *pAutoinc               /* OUTPUT: True if column is auto-increment */
);

H12910The sqlite3.h header file shall define the the following interfaces:
void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);

H12911The callback function registered by sqlite3_progress_handler() is invoked periodically during long running calls to sqlite3_step().
H12912The progress callback is invoked once for every N virtual machine opcodes, where N is the second argument to the sqlite3_progress_handler() call that registered the callback. If N is less than 1, sqlite3_progress_handler() acts as if a NULL progress handler had been specified.
H12913The progress callback itself is identified by the third argument to sqlite3_progress_handler().
H12914The fourth argument to sqlite3_progress_handler() is a void pointer passed to the progress callback function each time it is invoked.
H12915If a call to sqlite3_step() results in fewer than N opcodes being executed, then the progress callback is never invoked.
H12916Every call to sqlite3_progress_handler() overwrites any previously registered progress handler.
H12917If the progress handler callback is NULL then no progress handler is invoked.
H12918If the progress callback returns a result other than 0, then the behavior is a if sqlite3_interrupt() had been called.
H12930The sqlite3.h header file shall define the the following interfaces:
int sqlite3_get_autocommit(sqlite3*);

H12931The sqlite3_get_autocommit(D) interface returns non-zero or zero if the database connection D is or is not in autocommit mode, respectively.
H12932Autocommit mode is on by default.
H12933Autocommit mode is disabled by a successful BEGIN statement.
H12934Autocommit mode is enabled by a successful COMMIT or ROLLBACK statement.
H12950The sqlite3.h header file shall define the the following interfaces:
void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);

H12951The sqlite3_commit_hook(D,F,P) interface registers the callback function F to be invoked with argument P whenever a transaction commits on the database connection D.
H12952The sqlite3_commit_hook(D,F,P) interface returns the P argument from the previous call with the same database connection D, or NULL on the first call for a particular database connection D.
H12953Each call to sqlite3_commit_hook() overwrites the callback registered by prior calls.
H12954If the F argument to sqlite3_commit_hook(D,F,P) is NULL then the commit hook callback is canceled and no callback is invoked when a transaction commits.
H12955If the commit callback returns non-zero then the commit is converted into a rollback.
H12961The sqlite3_rollback_hook(D,F,P) interface registers the callback function F to be invoked with argument P whenever a transaction rolls back on the database connection D.
H12962The sqlite3_rollback_hook(D,F,P) interface returns the P argument from the previous call with the same database connection D, or NULL on the first call for a particular database connection D.
H12963Each call to sqlite3_rollback_hook() overwrites the callback registered by prior calls.
H12964If the F argument to sqlite3_rollback_hook(D,F,P) is NULL then the rollback hook callback is canceled and no callback is invoked when a transaction rolls back.
H12970The sqlite3.h header file shall define the the following interfaces:
void *sqlite3_update_hook(
  sqlite3*, 
  void(*)(void *,int ,char const *,char const *,sqlite3_int64),
  void*
);

H12971The sqlite3_update_hook(D,F,P) interface causes the callback function F to be invoked with first parameter P whenever a table row is modified, inserted, or deleted on the database connection D.
H12973The sqlite3_update_hook(D,F,P) interface returns the value of P for the previous call on the same database connection D, or NULL for the first call.
H12975If the update hook callback F in sqlite3_update_hook(D,F,P) is NULL then the no update callbacks are made.
H12977Each call to sqlite3_update_hook(D,F,P) overrides prior calls to the same interface on the same database connection D.
H12979The update hook callback is not invoked when internal system tables such as sqlite_master and sqlite_sequence are modified.
H12981The second parameter to the update callback is one of SQLITE_INSERT, SQLITE_DELETE or SQLITE_UPDATE, depending on the operation that caused the callback to be invoked.
H12983The third and fourth arguments to the callback contain pointers to zero-terminated UTF-8 strings which are the names of the database and table that is being updated.
H12985The final callback parameter is the rowid of the row after the change occurs.
H13000The sqlite3.h header file shall define the the following interfaces:
typedef struct sqlite3_stmt sqlite3_stmt;

H13010The sqlite3.h header file shall define the the following interfaces:
int sqlite3_prepare(
  sqlite3 *db,            /* Database handle */
  const char *zSql,       /* SQL statement, UTF-8 encoded */
  int nByte,              /* Maximum length of zSql in bytes. */
  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */
  const char **pzTail     /* OUT: Pointer to unused portion of zSql */
);
int sqlite3_prepare_v2(
  sqlite3 *db,            /* Database handle */
  const char *zSql,       /* SQL statement, UTF-8 encoded */
  int nByte,              /* Maximum length of zSql in bytes. */
  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */
  const char **pzTail     /* OUT: Pointer to unused portion of zSql */
);
int sqlite3_prepare16(
  sqlite3 *db,            /* Database handle */
  const void *zSql,       /* SQL statement, UTF-16 encoded */
  int nByte,              /* Maximum length of zSql in bytes. */
  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */
  const void **pzTail     /* OUT: Pointer to unused portion of zSql */
);
int sqlite3_prepare16_v2(
  sqlite3 *db,            /* Database handle */
  const void *zSql,       /* SQL statement, UTF-16 encoded */
  int nByte,              /* Maximum length of zSql in bytes. */
  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */
  const void **pzTail     /* OUT: Pointer to unused portion of zSql */
);

H13011The sqlite3_prepare(db,zSql,...) and sqlite3_prepare_v2(db,zSql,...) interfaces interpret the text in their zSql parameter as UTF-8.
H13012The sqlite3_prepare16(db,zSql,...) and sqlite3_prepare16_v2(db,zSql,...) interfaces interpret the text in their zSql parameter as UTF-16 in the native byte order.
H13013If the nByte argument to sqlite3_prepare_v2(db,zSql,nByte,...) and its variants is less than zero, the SQL text is read from zSql is read up to the first zero terminator.
H13014If the nByte argument to sqlite3_prepare_v2(db,zSql,nByte,...) and its variants is non-negative, then at most nBytes bytes of SQL text is read from zSql.
H13015In sqlite3_prepare_v2(db,zSql,N,P,pzTail) and its variants if the zSql input text contains more than one SQL statement and pzTail is not NULL, then *pzTail is made to point to the first byte past the end of the first SQL statement in zSql. What does *pzTail point to if there is one statement?
H13016A successful call to sqlite3_prepare_v2(db,zSql,N,ppStmt,...) or one of its variants writes into *ppStmt a pointer to a new prepared statement or a pointer to NULL if zSql contains nothing other than whitespace or comments.
H13019The sqlite3_prepare_v2() interface and its variants return SQLITE_OK or an appropriate error code upon failure.
H13021Before sqlite3_prepare(db,zSql,nByte,ppStmt,pzTail) or its variants returns an error (any value other than SQLITE_OK), they first set *ppStmt to NULL.
H13120The sqlite3.h header file shall define the the following interfaces:
sqlite3 *sqlite3_db_handle(sqlite3_stmt*);

H13123The sqlite3_db_handle(S) interface returns a pointer to the database connection associated with the prepared statement S.
H13140The sqlite3.h header file shall define the the following interfaces:
sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);

H13143If D is a database connection that holds one or more unfinalized prepared statements and S is a NULL pointer, then sqlite3_next_stmt(D, S) routine shall return a pointer to one of the prepared statements associated with D.
H13146If D is a database connection that holds no unfinalized prepared statements and S is a NULL pointer, then sqlite3_next_stmt(D, S) routine shall return a NULL pointer.
H13149If S is a prepared statement in the database connection D and S is not the last prepared statement in D, then sqlite3_next_stmt(D, S) routine shall return a pointer to the next prepared statement in D after S.
H13152If S is the last prepared statement in the database connection D then the sqlite3_next_stmt(D, S) routine shall return a NULL pointer.
H13200The sqlite3.h header file shall define the the following interfaces:
int sqlite3_step(sqlite3_stmt*);

H13202If the prepared statement S is ready to be run, then sqlite3_step(S) advances that prepared statement until completion or until it is ready to return another row of the result set, or until an interrupt or a run-time error occurs.
H13300The sqlite3.h header file shall define the the following interfaces:
int sqlite3_finalize(sqlite3_stmt *pStmt);

H13330The sqlite3.h header file shall define the the following interfaces:
int sqlite3_reset(sqlite3_stmt *pStmt);

H13500The sqlite3.h header file shall define the the following interfaces:
int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
int sqlite3_bind_double(sqlite3_stmt*, int, double);
int sqlite3_bind_int(sqlite3_stmt*, int, int);
int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
int sqlite3_bind_null(sqlite3_stmt*, int);
int sqlite3_bind_text(sqlite3_stmt*, int, const char*, int n, void(*)(void*));
int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);

H13506The SQL statement compiler recognizes tokens of the forms "?", "?NNN", "$VVV", ":VVV", and "@VVV" as SQL parameters, where NNN is any sequence of one or more digits and where VVV is any sequence of one or more alphanumeric characters or "::" optionally followed by a string containing no spaces and contained within parentheses.
H13509The initial value of an SQL parameter is NULL.
H13512The index of an "?" SQL parameter is one larger than the largest index of SQL parameter to the left, or 1 if the "?" is the leftmost SQL parameter.
H13515The index of an "?NNN" SQL parameter is the integer NNN.
H13518The index of an ":VVV", "$VVV", or "@VVV" SQL parameter is the same as the index of leftmost occurrences of the same parameter, or one more than the largest index over all parameters to the left if this is the first occurrence of this parameter, or 1 if this is the leftmost parameter.
H13521The SQL statement compiler fails with an SQLITE_RANGE error if the index of an SQL parameter is less than 1 or greater than the compile-time SQLITE_MAX_VARIABLE_NUMBER parameter.
H13524Calls to sqlite3_bind(S,N,V,...) associate the value V with all SQL parameters having an index of N in the prepared statement S.
H13527Calls to sqlite3_bind(S,N,...) override prior calls with the same values of S and N.
H13530Bindings established by sqlite3_bind(S,...) persist across calls to sqlite3_reset(S).
H13533In calls to sqlite3_bind_blob(S,N,V,L,D), sqlite3_bind_text(S,N,V,L,D), or sqlite3_bind_text16(S,N,V,L,D) SQLite binds the first L bytes of the BLOB or string pointed to by V, when L is non-negative.
H13536In calls to sqlite3_bind_text(S,N,V,L,D) or sqlite3_bind_text16(S,N,V,L,D) SQLite binds characters from V through the first zero character when L is negative.
H13539In calls to sqlite3_bind_blob(S,N,V,L,D), sqlite3_bind_text(S,N,V,L,D), or sqlite3_bind_text16(S,N,V,L,D) when D is the special constant SQLITE_STATIC, SQLite assumes that the value V is held in static unmanaged space that will not change during the lifetime of the binding.
H13542In calls to sqlite3_bind_blob(S,N,V,L,D), sqlite3_bind_text(S,N,V,L,D), or sqlite3_bind_text16(S,N,V,L,D) when D is the special constant SQLITE_TRANSIENT, the routine makes a private copy of the value V before it returns.
H13545In calls to sqlite3_bind_blob(S,N,V,L,D), sqlite3_bind_text(S,N,V,L,D), or sqlite3_bind_text16(S,N,V,L,D) when D is a pointer to a function, SQLite invokes that function to destroy the value V after it has finished using the value V.
H13548In calls to sqlite3_bind_zeroblob(S,N,V,L) the value bound is a BLOB of L bytes, or a zero-length BLOB if L is negative.
H13551In calls to sqlite3_bind_value(S,N,V) the V argument may be either a protected sqlite3_value object or an unprotected sqlite3_value object.
H13600The sqlite3.h header file shall define the the following interfaces:
int sqlite3_bind_parameter_count(sqlite3_stmt*);

H13601The sqlite3_bind_parameter_count(S) interface returns the largest index of all SQL parameters in the prepared statement S, or 0 if S contains no SQL parameters.
H13620The sqlite3.h header file shall define the the following interfaces:
const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int);

H13621The sqlite3_bind_parameter_name(S,N) interface returns a UTF-8 rendering of the name of the SQL parameter in the prepared statement S having index N, or NULL if there is no SQL parameter with index N or if the parameter with index N is an anonymous parameter "?".
H13640The sqlite3.h header file shall define the the following interfaces:
int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);

H13641The sqlite3_bind_parameter_index(S,N) interface returns the index of SQL parameter in the prepared statement S whose name matches the UTF-8 string N, or 0 if there is no match.
H13660The sqlite3.h header file shall define the the following interfaces:
int sqlite3_clear_bindings(sqlite3_stmt*);

H13661The sqlite3_clear_bindings(S) interface resets all SQL parameter bindings in the prepared statement S back to NULL.
H13710The sqlite3.h header file shall define the the following interfaces:
int sqlite3_column_count(sqlite3_stmt *pStmt);

H13711The sqlite3_column_count(S) interface returns the number of columns in the result set generated by the prepared statement S, or 0 if S does not generate a result set.
H13720The sqlite3.h header file shall define the the following interfaces:
const char *sqlite3_column_name(sqlite3_stmt*, int N);
const void *sqlite3_column_name16(sqlite3_stmt*, int N);

H13721A successful invocation of the sqlite3_column_name(S,N) interface returns the name of the Nth column (where 0 is the leftmost column) for the result set of the prepared statement S as a zero-terminated UTF-8 string.
H13723A successful invocation of the sqlite3_column_name16(S,N) interface returns the name of the Nth column (where 0 is the leftmost column) for the result set of the prepared statement S as a zero-terminated UTF-16 string in the native byte order.
H13724The sqlite3_column_name() and sqlite3_column_name16() interfaces return a NULL pointer if they are unable to allocate memory to hold their normal return strings.
H13725If the N parameter to sqlite3_column_name(S,N) or sqlite3_column_name16(S,N) is out of range, then the interfaces return a NULL pointer.
H13726The strings returned by sqlite3_column_name(S,N) and sqlite3_column_name16(S,N) are valid until the next call to either routine with the same S and N parameters or until sqlite3_finalize(S) is called.
H13727When a result column of a SELECT statement contains an AS clause, the name of that column is the identifier to the right of the AS keyword.
H13740The sqlite3.h header file shall define the the following interfaces:
const char *sqlite3_column_database_name(sqlite3_stmt*,int);
const void *sqlite3_column_database_name16(sqlite3_stmt*,int);
const char *sqlite3_column_table_name(sqlite3_stmt*,int);
const void *sqlite3_column_table_name16(sqlite3_stmt*,int);
const char *sqlite3_column_origin_name(sqlite3_stmt*,int);
const void *sqlite3_column_origin_name16(sqlite3_stmt*,int);

H13741The sqlite3_column_database_name(S,N) interface returns either the UTF-8 zero-terminated name of the database from which the Nth result column of the prepared statement S is extracted, or NULL if the Nth column of S is a general expression or if unable to allocate memory to store the name.
H13742The sqlite3_column_database_name16(S,N) interface returns either the UTF-16 native byte order zero-terminated name of the database from which the Nth result column of the prepared statement S is extracted, or NULL if the Nth column of S is a general expression or if unable to allocate memory to store the name.
H13743The sqlite3_column_table_name(S,N) interface returns either the UTF-8 zero-terminated name of the table from which the Nth result column of the prepared statement S is extracted, or NULL if the Nth column of S is a general expression or if unable to allocate memory to store the name.
H13744The sqlite3_column_table_name16(S,N) interface returns either the UTF-16 native byte order zero-terminated name of the table from which the Nth result column of the prepared statement S is extracted, or NULL if the Nth column of S is a general expression or if unable to allocate memory to store the name.
H13745The sqlite3_column_origin_name(S,N) interface returns either the UTF-8 zero-terminated name of the table column from which the Nth result column of the prepared statement S is extracted, or NULL if the Nth column of S is a general expression or if unable to allocate memory to store the name.
H13746The sqlite3_column_origin_name16(S,N) interface returns either the UTF-16 native byte order zero-terminated name of the table column from which the Nth result column of the prepared statement S is extracted, or NULL if the Nth column of S is a general expression or if unable to allocate memory to store the name.
H13748The return values from column metadata interfaces are valid for the lifetime of the prepared statement or until the encoding is changed by another metadata interface call for the same prepared statement and column.
H13760The sqlite3.h header file shall define the the following interfaces:
const char *sqlite3_column_decltype(sqlite3_stmt*,int);
const void *sqlite3_column_decltype16(sqlite3_stmt*,int);

H13761A successful call to sqlite3_column_decltype(S,N) returns a zero-terminated UTF-8 string containing the declared datatype of the table column that appears as the Nth column (numbered from 0) of the result set to the prepared statement S.
H13762A successful call to sqlite3_column_decltype16(S,N) returns a zero-terminated UTF-16 native byte order string containing the declared datatype of the table column that appears as the Nth column (numbered from 0) of the result set to the prepared statement S.
H13763If N is less than 0 or N is greater than or equal to the number of columns in the prepared statement S, or if the Nth column of S is an expression or subquery rather than a table column, or if a memory allocation failure occurs during encoding conversions, then calls to sqlite3_column_decltype(S,N) or sqlite3_column_decltype16(S,N) return NULL.
H13770The sqlite3.h header file shall define the the following interfaces:
int sqlite3_data_count(sqlite3_stmt *pStmt);

H13771After a call to sqlite3_step(S) that returns SQLITE_ROW, the sqlite3_data_count(S) routine will return the same value as the sqlite3_column_count(S) function.
H13772After sqlite3_step(S) has returned any value other than SQLITE_ROW or before sqlite3_step(S) has been called on the prepared statement for the first time since it was prepared or reset, the sqlite3_data_count(S) routine returns zero.
H13800The sqlite3.h header file shall define the the following interfaces:
const void *sqlite3_column_blob(sqlite3_stmt*, int iCol);
int sqlite3_column_bytes(sqlite3_stmt*, int iCol);
int sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
double sqlite3_column_double(sqlite3_stmt*, int iCol);
int sqlite3_column_int(sqlite3_stmt*, int iCol);
sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol);
const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);
const void *sqlite3_column_text16(sqlite3_stmt*, int iCol);
int sqlite3_column_type(sqlite3_stmt*, int iCol);
sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol);

H13803The sqlite3_column_blob(S,N) interface converts the Nth column in the current row of the result set for the prepared statement S into a BLOB and then returns a pointer to the converted value.
H13806The sqlite3_column_bytes(S,N) interface returns the number of bytes in the BLOB or string (exclusive of the zero terminator on the string) that was returned by the most recent call to sqlite3_column_blob(S,N) or sqlite3_column_text(S,N).
H13809The sqlite3_column_bytes16(S,N) interface returns the number of bytes in the string (exclusive of the zero terminator on the string) that was returned by the most recent call to sqlite3_column_text16(S,N).
H13812The sqlite3_column_double(S,N) interface converts the Nth column in the current row of the result set for the prepared statement S into a floating point value and returns a copy of that value.
H13815The sqlite3_column_int(S,N) interface converts the Nth column in the current row of the result set for the prepared statement S into a 64-bit signed integer and returns the lower 32 bits of that integer.
H13818The sqlite3_column_int64(S,N) interface converts the Nth column in the current row of the result set for the prepared statement S into a 64-bit signed integer and returns a copy of that integer.
H13821The sqlite3_column_text(S,N) interface converts the Nth column in the current row of the result set for the prepared statement S into a zero-terminated UTF-8 string and returns a pointer to that string.
H13824The sqlite3_column_text16(S,N) interface converts the Nth column in the current row of the result set for the prepared statement S into a zero-terminated 2-byte aligned UTF-16 native byte order string and returns a pointer to that string.
H13827The sqlite3_column_type(S,N) interface returns one of SQLITE_NULL, SQLITE_INTEGER, SQLITE_FLOAT, SQLITE_TEXT, or SQLITE_BLOB as appropriate for the Nth column in the current row of the result set for the prepared statement S.
H13830The sqlite3_column_value(S,N) interface returns a pointer to an unprotected sqlite3_value object for the Nth column in the current row of the result set for the prepared statement S.
H15000The sqlite3.h header file shall define the the following interfaces:
typedef struct Mem sqlite3_value;

H15100The sqlite3.h header file shall define the the following interfaces:
const void *sqlite3_value_blob(sqlite3_value*);
int sqlite3_value_bytes(sqlite3_value*);
int sqlite3_value_bytes16(sqlite3_value*);
double sqlite3_value_double(sqlite3_value*);
int sqlite3_value_int(sqlite3_value*);
sqlite3_int64 sqlite3_value_int64(sqlite3_value*);
const unsigned char *sqlite3_value_text(sqlite3_value*);
const void *sqlite3_value_text16(sqlite3_value*);
const void *sqlite3_value_text16le(sqlite3_value*);
const void *sqlite3_value_text16be(sqlite3_value*);
int sqlite3_value_type(sqlite3_value*);
int sqlite3_value_numeric_type(sqlite3_value*);

H15103The sqlite3_value_blob(V) interface converts the protected sqlite3_value object V into a BLOB and then returns a pointer to the converted value.
H15106The sqlite3_value_bytes(V) interface returns the number of bytes in the BLOB or string (exclusive of the zero terminator on the string) that was returned by the most recent call to sqlite3_value_blob(V) or sqlite3_value_text(V).
H15109The sqlite3_value_bytes16(V) interface returns the number of bytes in the string (exclusive of the zero terminator on the string) that was returned by the most recent call to sqlite3_value_text16(V), sqlite3_value_text16be(V), or sqlite3_value_text16le(V).
H15112The sqlite3_value_double(V) interface converts the protected sqlite3_value object V into a floating point value and returns a copy of that value.
H15115The sqlite3_value_int(V) interface converts the protected sqlite3_value object V into a 64-bit signed integer and returns the lower 32 bits of that integer.
H15118The sqlite3_value_int64(V) interface converts the protected sqlite3_value object V into a 64-bit signed integer and returns a copy of that integer.
H15121The sqlite3_value_text(V) interface converts the protected sqlite3_value object V into a zero-terminated UTF-8 string and returns a pointer to that string.
H15124The sqlite3_value_text16(V) interface converts the protected sqlite3_value object V into a zero-terminated 2-byte aligned UTF-16 native byte order string and returns a pointer to that string.
H15127The sqlite3_value_text16be(V) interface converts the protected sqlite3_value object V into a zero-terminated 2-byte aligned UTF-16 big-endian string and returns a pointer to that string.
H15130The sqlite3_value_text16le(V) interface converts the protected sqlite3_value object V into a zero-terminated 2-byte aligned UTF-16 little-endian string and returns a pointer to that string.
H15133The sqlite3_value_type(V) interface returns one of SQLITE_NULL, SQLITE_INTEGER, SQLITE_FLOAT, SQLITE_TEXT, or SQLITE_BLOB as appropriate for the sqlite3_value object V.
H15136The sqlite3_value_numeric_type(V) interface converts the protected sqlite3_value object V into either an integer or a floating point value if it can do so without loss of information, and returns one of SQLITE_NULL, SQLITE_INTEGER, SQLITE_FLOAT, SQLITE_TEXT, or SQLITE_BLOB as appropriate for the protected sqlite3_value object V after the conversion attempt.
H15304When a call to sqlite3_step(S) causes the prepared statement S to run to completion, the function returns SQLITE_DONE.
H15306When a call to sqlite3_step(S) stops because it is ready to return another row of the result set, it returns SQLITE_ROW.
H15308If a call to sqlite3_step(S) encounters an interrupt or a run-time error, it returns an appropriate error code that is not one of SQLITE_OK, SQLITE_ROW, or SQLITE_DONE.
H15310If an interrupt or a run-time error occurs during a call to sqlite3_step(S) for a prepared statement S created using legacy interfaces sqlite3_prepare() or sqlite3_prepare16(), then the function returns either SQLITE_ERROR, SQLITE_BUSY, or SQLITE_MISUSE.
H16001The sqlite3.h header file shall define the the following interfaces:
typedef struct sqlite3_context sqlite3_context;

H16100The sqlite3.h header file shall define the the following interfaces:
int sqlite3_create_function(
  sqlite3 *db,
  const char *zFunctionName,
  int nArg,
  int eTextRep,
  void *pApp,
  void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
  void (*xStep)(sqlite3_context*,int,sqlite3_value**),
  void (*xFinal)(sqlite3_context*)
);
int sqlite3_create_function16(
  sqlite3 *db,
  const void *zFunctionName,
  int nArg,
  int eTextRep,
  void *pApp,
  void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
  void (*xStep)(sqlite3_context*,int,sqlite3_value**),
  void (*xFinal)(sqlite3_context*)
);

H16103The sqlite3_create_function16() interface behaves exactly like sqlite3_create_function() in every way except that it interprets the zFunctionName argument as zero-terminated UTF-16 native byte order instead of as zero-terminated UTF-8.
H16106A successful invocation of the sqlite3_create_function(D,X,N,E,...) interface registers or replaces callback functions in the database connection D used to implement the SQL function named X with N parameters and having a preferred text encoding of E.
H16109A successful call to sqlite3_create_function(D,X,N,E,P,F,S,L) replaces the P, F, S, and L values from any prior calls with the same D, X, N, and E values.
H16112The sqlite3_create_function(D,X,...) interface fails with a return code of SQLITE_ERROR if the SQL function name X is longer than 255 bytes exclusive of the zero terminator.
H16118Either F must be NULL and S and L are non-NULL or else F is non-NULL and S and L are NULL, otherwise sqlite3_create_function(D,X,N,E,P,F,S,L) returns SQLITE_ERROR.
H16121The sqlite3_create_function(D,...) interface fails with an error code of SQLITE_BUSY if there exist prepared statements associated with the database connection D.
H16124The sqlite3_create_function(D,X,N,...) interface fails with an error code of SQLITE_ERROR if parameter N (specifying the number of arguments to the SQL function being registered) is less than -1 or greater than 127.
H16127When N is non-negative, the sqlite3_create_function(D,X,N,...) interface causes callbacks to be invoked for the SQL function named X when the number of arguments to the SQL function is exactly N.
H16130When N is -1, the sqlite3_create_function(D,X,N,...) interface causes callbacks to be invoked for the SQL function named X with any number of arguments.
H16133When calls to sqlite3_create_function(D,X,N,...) specify multiple implementations of the same function X and when one implementation has N>=0 and the other has N=(-1) the implementation with a non-zero N is preferred.
H16136When calls to sqlite3_create_function(D,X,N,E,...) specify multiple implementations of the same function X with the same number of arguments N but with different encodings E, then the implementation where E matches the database encoding is preferred.
H16139For an aggregate SQL function created using sqlite3_create_function(D,X,N,E,P,0,S,L) the finalizer function L will always be invoked exactly once if the step function S is called one or more times.
H16142When SQLite invokes either the xFunc or xStep function of an application-defined SQL function or aggregate created by sqlite3_create_function() or sqlite3_create_function16(), then the array of sqlite3_value objects passed as the third parameter are always protected sqlite3_value objects.
H16210The sqlite3.h header file shall define the the following interfaces:
void *sqlite3_aggregate_context(sqlite3_context*, int nBytes);

H16211The first invocation of sqlite3_aggregate_context(C,N) for a particular instance of an aggregate function (for a particular context C) causes SQLite to allocate N bytes of memory, zero that memory, and return a pointer to the allocated memory.
H16213If a memory allocation error occurs during sqlite3_aggregate_context(C,N) then the function returns 0.
H16215Second and subsequent invocations of sqlite3_aggregate_context(C,N) for the same context pointer C ignore the N parameter and return a pointer to the same block of memory returned by the first invocation.
H16217The memory allocated by sqlite3_aggregate_context(C,N) is automatically freed on the next call to sqlite3_reset() or sqlite3_finalize() for the prepared statement containing the aggregate function associated with context C.
H16240The sqlite3.h header file shall define the the following interfaces:
void *sqlite3_user_data(sqlite3_context*);

H16243The sqlite3_user_data(C) interface returns a copy of the P pointer from the sqlite3_create_function(D,X,N,E,P,F,S,L) or sqlite3_create_function16(D,X,N,E,P,F,S,L) call that registered the SQL function associated with sqlite3_context C.
H16250The sqlite3.h header file shall define the the following interfaces:
sqlite3 *sqlite3_context_db_handle(sqlite3_context*);

H16253The sqlite3_context_db_handle(C) interface returns a copy of the D pointer from the sqlite3_create_function(D,X,N,E,P,F,S,L) or sqlite3_create_function16(D,X,N,E,P,F,S,L) call that registered the SQL function associated with sqlite3_context C.
H16270The sqlite3.h header file shall define the the following interfaces:
void *sqlite3_get_auxdata(sqlite3_context*, int N);
void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));

H16272The sqlite3_get_auxdata(C,N) interface returns a pointer to metadata associated with the Nth parameter of the SQL function whose context is C, or NULL if there is no metadata associated with that parameter.
H16274The sqlite3_set_auxdata(C,N,P,D) interface assigns a metadata pointer P to the Nth parameter of the SQL function with context C.
H16276SQLite will invoke the destructor D with a single argument which is the metadata pointer P following a call to sqlite3_set_auxdata(C,N,P,D) when SQLite ceases to hold the metadata.
H16277SQLite ceases to hold metadata for an SQL function parameter when the value of that parameter changes.
H16278When sqlite3_set_auxdata(C,N,P,D) is invoked, the destructor is called for any prior metadata associated with the same function context C and parameter N.
H16279SQLite will call destructors for any metadata it is holding in a particular prepared statement S when either sqlite3_reset(S) or sqlite3_finalize(S) is called.
H16342The sqlite3_release_memory(N) returns the number of bytes actually freed, which might be more or less than the amount requested.
H16351The sqlite3_soft_heap_limit(N) interface places a soft limit of N bytes on the amount of heap memory that may be allocated using sqlite3_malloc() or sqlite3_realloc() at any point in time.
H16352If a call to sqlite3_malloc() or sqlite3_realloc() would cause the total amount of allocated memory to exceed the soft heap limit, then sqlite3_release_memory() is invoked in an attempt to reduce the memory usage prior to proceeding with the memory allocation attempt.
H16353Calls to sqlite3_malloc() or sqlite3_realloc() that trigger attempts to reduce memory usage through the soft heap limit mechanism continue even if the attempt to reduce memory usage is unsuccessful.
H16354A negative or zero value for N in a call to sqlite3_soft_heap_limit(N) means that there is no soft heap limit and sqlite3_release_memory() will only be called when memory is completely exhausted.
H16355The default value for the soft heap limit is zero.
H16358Each call to sqlite3_soft_heap_limit(N) overrides the values set by all prior calls.
H16400The sqlite3.h header file shall define the the following interfaces:
void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
void sqlite3_result_double(sqlite3_context*, double);
void sqlite3_result_error(sqlite3_context*, const char*, int);
void sqlite3_result_error16(sqlite3_context*, const void*, int);
void sqlite3_result_error_toobig(sqlite3_context*);
void sqlite3_result_error_nomem(sqlite3_context*);
void sqlite3_result_error_code(sqlite3_context*, int);
void sqlite3_result_int(sqlite3_context*, int);
void sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
void sqlite3_result_null(sqlite3_context*);
void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
void sqlite3_result_value(sqlite3_context*, sqlite3_value*);
void sqlite3_result_zeroblob(sqlite3_context*, int n);

H16403The default return value from any SQL function is NULL.
H16406The sqlite3_result_blob(C,V,N,D) interface changes the return value of function C to be a BLOB that is N bytes in length and with content pointed to by V.
H16409The sqlite3_result_double(C,V) interface changes the return value of function C to be the floating point value V.
H16412The sqlite3_result_error(C,V,N) interface changes the return value of function C to be an exception with error code SQLITE_ERROR and a UTF-8 error message copied from V up to the first zero byte or until N bytes are read if N is positive.
H16415The sqlite3_result_error16(C,V,N) interface changes the return value of function C to be an exception with error code SQLITE_ERROR and a UTF-16 native byte order error message copied from V up to the first zero terminator or until N bytes are read if N is positive.
H16418The sqlite3_result_error_toobig(C) interface changes the return value of the function C to be an exception with error code SQLITE_TOOBIG and an appropriate error message.
H16421The sqlite3_result_error_nomem(C) interface changes the return value of the function C to be an exception with error code SQLITE_NOMEM and an appropriate error message.
H16424The sqlite3_result_error_code(C,E) interface changes the return value of the function C to be an exception with error code E. The error message text is unchanged.
H16427The sqlite3_result_int(C,V) interface changes the return value of function C to be the 32-bit integer value V.
H16430The sqlite3_result_int64(C,V) interface changes the return value of function C to be the 64-bit integer value V.
H16433The sqlite3_result_null(C) interface changes the return value of function C to be NULL.
H16436The sqlite3_result_text(C,V,N,D) interface changes the return value of function C to be the UTF-8 string V up to the first zero if N is negative or the first N bytes of V if N is non-negative.
H16439The sqlite3_result_text16(C,V,N,D) interface changes the return value of function C to be the UTF-16 native byte order string V up to the first zero if N is negative or the first N bytes of V if N is non-negative.
H16442The sqlite3_result_text16be(C,V,N,D) interface changes the return value of function C to be the UTF-16 big-endian string V up to the first zero if N is negative or the first N bytes or V if N is non-negative.
H16445The sqlite3_result_text16le(C,V,N,D) interface changes the return value of function C to be the UTF-16 little-endian string V up to the first zero if N is negative or the first N bytes of V if N is non-negative.
H16448The sqlite3_result_value(C,V) interface changes the return value of function C to be the unprotected sqlite3_value object V.
H16451The sqlite3_result_zeroblob(C,N) interface changes the return value of function C to be an N-byte BLOB of all zeros.
H16454The sqlite3_result_error() and sqlite3_result_error16() interfaces make a copy of their error message strings before returning.
H16457If the D destructor parameter to sqlite3_result_blob(C,V,N,D), sqlite3_result_text(C,V,N,D), sqlite3_result_text16(C,V,N,D), sqlite3_result_text16be(C,V,N,D), or sqlite3_result_text16le(C,V,N,D) is the constant SQLITE_STATIC then no destructor is ever called on the pointer V and SQLite assumes that V is immutable.
H16460If the D destructor parameter to sqlite3_result_blob(C,V,N,D), sqlite3_result_text(C,V,N,D), sqlite3_result_text16(C,V,N,D), sqlite3_result_text16be(C,V,N,D), or sqlite3_result_text16le(C,V,N,D) is the constant SQLITE_TRANSIENT then the interfaces makes a copy of the content of V and retains the copy.
H16463If the D destructor parameter to sqlite3_result_blob(C,V,N,D), sqlite3_result_text(C,V,N,D), sqlite3_result_text16(C,V,N,D), sqlite3_result_text16be(C,V,N,D), or sqlite3_result_text16le(C,V,N,D) is some value other than the constants SQLITE_STATIC and SQLITE_TRANSIENT then SQLite will invoke the destructor D with V as its only argument when it has finished with the V value.
H16600The sqlite3.h header file shall define the the following interfaces:
int sqlite3_create_collation(
  sqlite3*, 
  const char *zName, 
  int eTextRep, 
  void*,
  int(*xCompare)(void*,int,const void*,int,const void*)
);
int sqlite3_create_collation_v2(
  sqlite3*, 
  const char *zName, 
  int eTextRep, 
  void*,
  int(*xCompare)(void*,int,const void*,int,const void*),
  void(*xDestroy)(void*)
);
int sqlite3_create_collation16(
  sqlite3*, 
  const void *zName,
  int eTextRep, 
  void*,
  int(*xCompare)(void*,int,const void*,int,const void*)
);

H16603A successful call to the sqlite3_create_collation_v2(B,X,E,P,F,D) interface registers function F as the comparison function used to implement collation X on the database connection B for databases having encoding E.
H16604SQLite understands the X parameter to sqlite3_create_collation_v2(B,X,E,P,F,D) as a zero-terminated UTF-8 string in which case is ignored for ASCII characters and is significant for non-ASCII characters.
H16606Successive calls to sqlite3_create_collation_v2(B,X,E,P,F,D) with the same values for B, X, and E, override prior values of P, F, and D.
H16609If the destructor D in sqlite3_create_collation_v2(B,X,E,P,F,D) is not NULL then it is called with argument P when the collating function is dropped by SQLite.
H16612A collating function is dropped when it is overloaded.
H16615A collating function is dropped when the database connection is closed using sqlite3_close().
H16618The pointer P in sqlite3_create_collation_v2(B,X,E,P,F,D) is passed through as the first parameter to the comparison function F for all subsequent invocations of F.
H16621A call to sqlite3_create_collation(B,X,E,P,F) is exactly the same as a call to sqlite3_create_collation_v2() with the same parameters and a NULL destructor.
H16624Following a sqlite3_create_collation_v2(B,X,E,P,F,D), SQLite uses the comparison function F for all text comparison operations on the database connection B on text values that use the collating sequence named X.
H16627The sqlite3_create_collation16(B,X,E,P,F) works the same as sqlite3_create_collation(B,X,E,P,F) except that the collation name X is understood as UTF-16 in native byte order instead of UTF-8.
H16630When multiple comparison functions are available for the same collating sequence, SQLite chooses the one whose text encoding requires the least amount of conversion from the default text encoding of the database.
H16700The sqlite3.h header file shall define the the following interfaces:
int sqlite3_collation_needed(
  sqlite3*, 
  void*, 
  void(*)(void*,sqlite3*,int eTextRep,const char*)
);
int sqlite3_collation_needed16(
  sqlite3*, 
  void*,
  void(*)(void*,sqlite3*,int eTextRep,const void*)
);

H16702A successful call to sqlite3_collation_needed(D,P,F) or sqlite3_collation_needed16(D,P,F) causes the database connection D to invoke callback F with first parameter P whenever it needs a comparison function for a collating sequence that it does not know about.
H16704Each successful call to sqlite3_collation_needed() or sqlite3_collation_needed16() overrides the callback registered on the same database connection by prior calls to either interface.
H16706The name of the requested collating function passed in the 4th parameter to the callback is in UTF-8 if the callback was registered using sqlite3_collation_needed() and is in UTF-16 native byte order if the callback was registered using sqlite3_collation_needed16().
H17000The sqlite3.h header file shall define the the following interfaces:
sqlite3_mutex *sqlite3_mutex_alloc(int);
void sqlite3_mutex_free(sqlite3_mutex*);
void sqlite3_mutex_enter(sqlite3_mutex*);
int sqlite3_mutex_try(sqlite3_mutex*);
void sqlite3_mutex_leave(sqlite3_mutex*);

H17001The sqlite3.h header file shall define the the following interfaces:
#define SQLITE_MUTEX_FAST             0
#define SQLITE_MUTEX_RECURSIVE        1
#define SQLITE_MUTEX_STATIC_MASTER    2
#define SQLITE_MUTEX_STATIC_MEM       3  /* sqlite3_malloc() */
#define SQLITE_MUTEX_STATIC_MEM2      4  /* sqlite3_release_memory() */
#define SQLITE_MUTEX_STATIC_PRNG      5  /* sqlite3_random() */
#define SQLITE_MUTEX_STATIC_LRU       6  /* lru page list */
#define SQLITE_MUTEX_STATIC_LRU2      7  /* lru page list */

H17080The sqlite3.h header file shall define the the following interfaces:
int sqlite3_mutex_held(sqlite3_mutex*);
int sqlite3_mutex_notheld(sqlite3_mutex*);

H17110The sqlite3.h header file shall define the the following interfaces:
typedef struct sqlite3_mutex sqlite3_mutex;

H17120The sqlite3.h header file shall define the the following interfaces:
typedef struct sqlite3_mutex_methods sqlite3_mutex_methods;
struct sqlite3_mutex_methods {
  int (*xMutexInit)(void);
  int (*xMutexEnd)(void);
  sqlite3_mutex *(*xMutexAlloc)(int);
  void (*xMutexFree)(sqlite3_mutex *);
  void (*xMutexEnter)(sqlite3_mutex *);
  int (*xMutexTry)(sqlite3_mutex *);
  void (*xMutexLeave)(sqlite3_mutex *);
  int (*xMutexHeld)(sqlite3_mutex *);
  int (*xMutexNotheld)(sqlite3_mutex *);
};

H17200The sqlite3.h header file shall define the the following interfaces:
int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);

H17201The sqlite3.h header file shall define the the following interfaces:
int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);

H17250The sqlite3.h header file shall define the the following interfaces:
#define SQLITE_STATUS_MEMORY_USED          0
#define SQLITE_STATUS_PAGECACHE_USED       1
#define SQLITE_STATUS_PAGECACHE_OVERFLOW   2
#define SQLITE_STATUS_SCRATCH_USED         3
#define SQLITE_STATUS_SCRATCH_OVERFLOW     4
#define SQLITE_STATUS_MALLOC_SIZE          5
#define SQLITE_STATUS_PARSER_STACK         6
#define SQLITE_STATUS_PAGECACHE_SIZE       7
#define SQLITE_STATUS_SCRATCH_SIZE         8

H17275The sqlite3.h header file shall define the the following interfaces:
#define SQLITE_DBSTATUS_LOOKASIDE_USED     0

H17300The sqlite3.h header file shall define the the following interfaces:
void *sqlite3_malloc(int);
void *sqlite3_realloc(void*, int);
void sqlite3_free(void*);

H17303The sqlite3_malloc(N) interface returns either a pointer to a newly checked-out block of at least N bytes of memory that is 8-byte aligned, or it returns NULL if it is unable to fulfill the request.
H17304The sqlite3_malloc(N) interface returns a NULL pointer if N is less than or equal to zero.
H17305The sqlite3_free(P) interface releases memory previously returned from sqlite3_malloc() or sqlite3_realloc(), making it available for reuse.
H17306A call to sqlite3_free(NULL) is a harmless no-op.
H17310A call to sqlite3_realloc(0,N) is equivalent to a call to sqlite3_malloc(N).
H17312A call to sqlite3_realloc(P,0) is equivalent to a call to sqlite3_free(P).
H17315The SQLite core uses sqlite3_malloc(), sqlite3_realloc(), and sqlite3_free() for all of its memory allocation and deallocation needs.
H17318The sqlite3_realloc(P,N) interface returns either a pointer to a block of checked-out memory of at least N bytes in size that is 8-byte aligned, or a NULL pointer.
H17321When sqlite3_realloc(P,N) returns a non-NULL pointer, it first copies the first K bytes of content from P into the newly allocated block, where K is the lesser of N and the size of the buffer P.
H17322When sqlite3_realloc(P,N) returns a non-NULL pointer, it first releases the buffer P.
H17323When sqlite3_realloc(P,N) returns NULL, the buffer P is not modified or released.
H17340The sqlite3.h header file shall define the the following interfaces:
int sqlite3_release_memory(int);

H17341The sqlite3_release_memory(N) interface attempts to free N bytes of heap memory by deallocating non-essential memory allocations held by the database library.
H17350The sqlite3.h header file shall define the the following interfaces:
void sqlite3_soft_heap_limit(int);

H17370The sqlite3.h header file shall define the the following interfaces:
sqlite3_int64 sqlite3_memory_used(void);
sqlite3_int64 sqlite3_memory_highwater(int resetFlag);

H17371The sqlite3_memory_used() routine returns the number of bytes of memory currently outstanding (malloced but not freed).
H17373The sqlite3_memory_highwater() routine returns the maximum value of sqlite3_memory_used() since the high-water mark was last reset.
H17374The values returned by sqlite3_memory_used() and sqlite3_memory_highwater() include any overhead added by SQLite in its implementation of sqlite3_malloc(), but not overhead added by the any underlying system library routines that sqlite3_malloc() may call.
H17375The memory high-water mark is reset to the current value of sqlite3_memory_used() if and only if the parameter to sqlite3_memory_highwater() is true. The value returned by sqlite3_memory_highwater(1) is the high-water mark prior to the reset.
H17390The sqlite3.h header file shall define the the following interfaces:
void sqlite3_randomness(int N, void *P);

H17392The sqlite3_randomness(N,P) interface writes N bytes of high-quality pseudo-randomness into buffer P.
H17400The sqlite3.h header file shall define the the following interfaces:
char *sqlite3_mprintf(const char*,...);
char *sqlite3_vmprintf(const char*, va_list);
char *sqlite3_snprintf(int,char*,const char*, ...);

H17403The sqlite3_mprintf() and sqlite3_vmprintf() interfaces return either pointers to zero-terminated UTF-8 strings held in memory obtained from sqlite3_malloc() or NULL pointers if a call to sqlite3_malloc() fails.
H17406The sqlite3_snprintf() interface writes a zero-terminated UTF-8 string into the buffer pointed to by the second parameter provided that the first parameter is greater than zero.
H17407The sqlite3_snprintf() interface does not write slots of its output buffer (the second parameter) outside the range of 0 through N-1 (where N is the first parameter) regardless of the length of the string requested by the format specification.
H17800The sqlite3.h header file shall define the the following interfaces:
typedef struct sqlite3_blob sqlite3_blob;

H17810The sqlite3.h header file shall define the the following interfaces:
int sqlite3_blob_open(
  sqlite3*,
  const char *zDb,
  const char *zTable,
  const char *zColumn,
  sqlite3_int64 iRow,
  int flags,
  sqlite3_blob **ppBlob
);

H17813A successful invocation of the sqlite3_blob_open(D,B,T,C,R,F,P) interface shall open an sqlite3_blob object P on the BLOB in column C of the table T in the database B on the database connection D.
H17814A successful invocation of sqlite3_blob_open(D,...) shall start a new transaction on the database connection D if that connection is not already in a transaction.
H17816The sqlite3_blob_open(D,B,T,C,R,F,P) interface shall open the BLOB for read and write access if and only if the F parameter is non-zero.
H17819The sqlite3_blob_open() interface shall return SQLITE_OK on success and an appropriate error code on failure.
H17821If an error occurs during evaluation of sqlite3_blob_open(D,...) then subsequent calls to sqlite3_errcode(D), sqlite3_errmsg(D), and sqlite3_errmsg16(D) shall return information appropriate for that error.
H17824If any column in the row that a sqlite3_blob has open is changed by a separate UPDATE or DELETE statement or by an ON CONFLICT side effect, then the sqlite3_blob shall be marked as invalid.
H17830The sqlite3.h header file shall define the the following interfaces:
int sqlite3_blob_close(sqlite3_blob *);

H17833The sqlite3_blob_close(P) interface closes an sqlite3_blob object P previously opened using sqlite3_blob_open().
H17836Closing an sqlite3_blob object using sqlite3_blob_close() shall cause the current transaction to commit if there are no other open sqlite3_blob objects or prepared statements on the same database connection and the database connection is in autocommit mode.
H17839The sqlite3_blob_close(P) interfaces shall close the sqlite3_blob object P unconditionally, even if sqlite3_blob_close(P) returns something other than SQLITE_OK.
H17840The sqlite3.h header file shall define the the following interfaces:
int sqlite3_blob_bytes(sqlite3_blob *);

H17843The sqlite3_blob_bytes(P) interface returns the size in bytes of the BLOB that the sqlite3_blob object P refers to.
H17850The sqlite3.h header file shall define the the following interfaces:
int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);

H17853A successful invocation of sqlite3_blob_read(P,Z,N,X) shall reads N bytes of data out of the BLOB referenced by BLOB handle P beginning at offset X and store those bytes into buffer Z.
H17856In sqlite3_blob_read(P,Z,N,X) if the size of the BLOB is less than N+X bytes, then the function shall leave the Z buffer unchanged and return SQLITE_ERROR.
H17859In sqlite3_blob_read(P,Z,N,X) if X or N is less than zero then the function shall leave the Z buffer unchanged and return SQLITE_ERROR.
H17862The sqlite3_blob_read(P,Z,N,X) interface shall return SQLITE_OK if N bytes are successfully read into buffer Z.
H17863If the BLOB handle P is expired and X and N are within bounds then sqlite3_blob_read(P,Z,N,X) shall leave the Z buffer unchanged and return SQLITE_ABORT.
H17865If the requested read could not be completed, the sqlite3_blob_read(P,Z,N,X) interface shall return an appropriate error code or extended error code.
H17868If an error occurs during evaluation of sqlite3_blob_read(P,...) then subsequent calls to sqlite3_errcode(D), sqlite3_errmsg(D), and sqlite3_errmsg16(D) shall return information appropriate for that error, where D is the database connection that was used to open the BLOB handle P.
H17870The sqlite3.h header file shall define the the following interfaces:
int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);

H17873A successful invocation of sqlite3_blob_write(P,Z,N,X) shall write N bytes of data from buffer Z into the BLOB referenced by BLOB handle P beginning at offset X into the BLOB.
H17874In the absence of other overridding changes, the changes written to a BLOB by sqlite3_blob_write() shall remain in effect after the associated BLOB handle expires.
H17875If the BLOB handle P was opened for reading only then an invocation of sqlite3_blob_write(P,Z,N,X) shall leave the referenced BLOB unchanged and return SQLITE_READONLY.
H17876If the size of the BLOB referenced by BLOB handle P is less than N+X bytes then sqlite3_blob_write(P,Z,N,X) shall leave the BLOB unchanged and return SQLITE_ERROR.
H17877If the BLOB handle P is expired and X and N are within bounds then sqlite3_blob_read(P,Z,N,X) shall leave the BLOB unchanged and return SQLITE_ABORT.
H17879If X or N are less than zero then sqlite3_blob_write(P,Z,N,X) shall leave the BLOB referenced by BLOB handle P unchanged and return SQLITE_ERROR.
H17882The sqlite3_blob_write(P,Z,N,X) interface shall return SQLITE_OK if N bytes where successfully written into the BLOB.
H17885If the requested write could not be completed, the sqlite3_blob_write(P,Z,N,X) interface shall return an appropriate error code or extended error code.
H17888If an error occurs during evaluation of sqlite3_blob_write(D,...) then subsequent calls to sqlite3_errcode(D), sqlite3_errmsg(D), and sqlite3_errmsg16(D) shall return information appropriate for that error.
H18000The sqlite3.h header file shall define the the following interfaces:
struct sqlite3_module {
  int iVersion;
  int (*xCreate)(sqlite3*, void *pAux,
               int argc, const char *const*argv,
               sqlite3_vtab **ppVTab, char**);
  int (*xConnect)(sqlite3*, void *pAux,
               int argc, const char *const*argv,
               sqlite3_vtab **ppVTab, char**);
  int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*);
  int (*xDisconnect)(sqlite3_vtab *pVTab);
  int (*xDestroy)(sqlite3_vtab *pVTab);
  int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor);
  int (*xClose)(sqlite3_vtab_cursor*);
  int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr,
                int argc, sqlite3_value **argv);
  int (*xNext)(sqlite3_vtab_cursor*);
  int (*xEof)(sqlite3_vtab_cursor*);
  int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int);
  int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid);
  int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *);
  int (*xBegin)(sqlite3_vtab *pVTab);
  int (*xSync)(sqlite3_vtab *pVTab);
  int (*xCommit)(sqlite3_vtab *pVTab);
  int (*xRollback)(sqlite3_vtab *pVTab);
  int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName,
                       void (**pxFunc)(sqlite3_context*,int,sqlite3_value**),
                       void **ppArg);
  int (*xRename)(sqlite3_vtab *pVtab, const char *zNew);
};

H18010The sqlite3.h header file shall define the the following interfaces:
struct sqlite3_vtab {
  const sqlite3_module *pModule;  /* The module for this virtual table */
  int nRef;                       /* Used internally */
  char *zErrMsg;                  /* Error message from sqlite3_mprintf() */
  /* Virtual table implementations will typically add additional fields */
};

H18020The sqlite3.h header file shall define the the following interfaces:
struct sqlite3_vtab_cursor {
  sqlite3_vtab *pVtab;      /* Virtual table of this cursor */
  /* Virtual table implementations will typically add additional fields */
};

H18100The sqlite3.h header file shall define the the following interfaces:
struct sqlite3_index_info {
  /* Inputs */
  int nConstraint;           /* Number of entries in aConstraint */
  struct sqlite3_index_constraint {
     int iColumn;              /* Column on left-hand side of constraint */
     unsigned char op;         /* Constraint operator */
     unsigned char usable;     /* True if this constraint is usable */
     int iTermOffset;          /* Used internally - xBestIndex should ignore */
  } *aConstraint;            /* Table of WHERE clause constraints */
  int nOrderBy;              /* Number of terms in the ORDER BY clause */
  struct sqlite3_index_orderby {
     int iColumn;              /* Column number */
     unsigned char desc;       /* True for DESC.  False for ASC. */
  } *aOrderBy;               /* The ORDER BY clause */
  /* Outputs */
  struct sqlite3_index_constraint_usage {
    int argvIndex;           /* if >0, constraint is part of argv to xFilter */
    unsigned char omit;      /* Do not code a test for this constraint */
  } *aConstraintUsage;
  int idxNum;                /* Number used to identify the index */
  char *idxStr;              /* String, possibly obtained from sqlite3_malloc */
  int needToFreeIdxStr;      /* Free idxStr using sqlite3_free() if true */
  int orderByConsumed;       /* True if output is already ordered */
  double estimatedCost;      /* Estimated cost of using this index */
};
#define SQLITE_INDEX_CONSTRAINT_EQ    2
#define SQLITE_INDEX_CONSTRAINT_GT    4
#define SQLITE_INDEX_CONSTRAINT_LE    8
#define SQLITE_INDEX_CONSTRAINT_LT    16
#define SQLITE_INDEX_CONSTRAINT_GE    32
#define SQLITE_INDEX_CONSTRAINT_MATCH 64

H18200The sqlite3.h header file shall define the the following interfaces:
int sqlite3_create_module(
  sqlite3 *db,               /* SQLite connection to register module with */
  const char *zName,         /* Name of the module */
  const sqlite3_module *,    /* Methods for the module */
  void *                     /* Client data for xCreate/xConnect */
);

H18210The sqlite3.h header file shall define the the following interfaces:
int sqlite3_create_module_v2(
  sqlite3 *db,               /* SQLite connection to register module with */
  const char *zName,         /* Name of the module */
  const sqlite3_module *,    /* Methods for the module */
  void *,                    /* Client data for xCreate/xConnect */
  void(*xDestroy)(void*)     /* Module destructor function */
);

H18280The sqlite3.h header file shall define the the following interfaces:
int sqlite3_declare_vtab(sqlite3*, const char *zCreateTable);

H18300The sqlite3.h header file shall define the the following interfaces:
int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);

H21001 Except for the read operation required by H21007 and those reads made as part of opening a read-only transaction, SQLite shall only read data from a database connection while the database connection has an open read-only or read/write transaction.
H21002 Aside from those read operations described by H21007 and H21XXX, SQLite shall read data from the database in aligned blocks of page-size bytes, where page-size is the database page size used by the database file.
H21003 While opening a read-only transaction, after successfully obtaining a shared lock on the database file, SQLite shall attempt to detect and roll back a hot journal file associated with the same database file.
H21004 Assuming no errors have occured, then after attempting to detect and roll back a hot journal file, if the connections page cache is not empty, then SQLite shall validate the contents of the page cache by testing the file change counter. This procedure is known as cache validiation.
H21005 If the contents of the page cache are found to be invalid by the check prescribed by F20040, SQLite shall discard the cache contents before continuing.
H21006 When a new database connection is required, SQLite shall attempt to open a file-handle on the database file. If the attempt fails, then no new database connection is created and an error returned.
H21007 When a new database connection is required, after opening the new file-handle, SQLite shall attempt to read the first 100 bytes of the database file. If the attempt fails for any other reason than that the opened file is less than 100 bytes in size, then the file-handle is closed, no new database connection is created and an error returned instead.
H21008 If the database file header is successfully read from a newly opened database file, the connections expected page-size shall be set to the value stored in the page-size field of the database header.
H21009 If the database file header cannot be read from a newly opened database file (because the file is less than 100 bytes in size), the connections expected page-size shall be set to the compile time value of the SQLITE_DEFAULT_PAGESIZE option.
H21010 When required to open a read-only transaction using a database connection, SQLite shall first attempt to obtain a shared-lock on the file-handle open on the database file.
H21011 If, while opening a read-only transaction, SQLite fails to obtain the shared-lock on the database file, then the process is abandoned, no transaction is opened and an error returned to the user.
H21012 If, while opening a read-only transaction, SQLite encounters an error while attempting to detect or roll back a hot journal file, then the shared-lock on the database file is released, no transaction is opened and an error returned to the user.
H21013 When required to end a read-only transaction, SQLite shall relinquish the shared lock held on the database file by calling the xUnlock() method of the file-handle.
H21014 When required to attempt to detect a hot-journal file, SQLite shall first use the xAccess() method of the VFS layer to check if a journal file exists in the file-system.
H21015 When required to attempt to detect a hot-journal file, if the call to xAccess() required by H21014 indicates that a journal file does not exist, then the attempt to detect a hot-journal file is finished. A hot-journal file was not detected.
H21016 When required to attempt to detect a hot-journal file, if the call to xAccess() required by H21014 indicates that a journal file is present, then the xCheckReservedLock() method of the database file file-handle is invoked to determine whether or not some other process is holding a reserved or greater lock on the database file.
H21017 If the call to xCheckReservedLock() required by H21016 indicates that some other database connection is holding a reserved or greater lock on the database file,
H21018 When a file-handle open on a database file is unlocked, if the page cache belonging to the associated database connection is not empty, SQLite shall store the value of the file change counter internally.
H21019 When required to perform cache validation as part of opening a read transaction, SQLite shall read a 16 byte block starting at byte offset 24 of the database file using the xRead() method of the database connections file handle.
H21020 While performing cache validation, after loading the 16 byte block as required by H21019, SQLite shall compare the 32-bit big-endian integer stored in the first 4 bytes of the block to the most recently stored value of the file change counter (see H21018). If the values are not the same, then SQLite shall conclude that the contents of the cache are invalid.
H21021 During the conclusing of a read transaction, before unlocking the database file, SQLite shall set the connections expected page size to the current database page-size.
H21022 As part of opening a new read transaction, immediately after performing cache validation, if there is no data for database page 1 in the page cache, SQLite shall read N bytes from the start of the database file using the xRead() method of the connections file handle, where N is the connections current expected page size value.
H21023 If page 1 data is read as required by H21023, then the value of the page-size field that appears in the database file header that consumes the first 100 bytes of the read block is not the same as the connections current expected page size, then the expected page size is set to this value, the database file is unlocked and the entire procedure to open a read transaction is repeated.
H21024 If page 1 data is read as required by H21023, then the value of the page-size field that appears in the database file header that consumes the first 100 bytes of the read block is the same as the connections current expected page size, then the block of data read is added to the connections page cache as page 1.
H21025 Before modifying or adding any in-memory page cache pages in preparation for writing to the database file, the database connection shall open a write transaction on the database file.
H21026 Before modifying the page cache image of a database page that existed and was not a free-list leaf page when the current write transaction began, SQLite shall ensure that the original page content has been written to the journal file (journalled).
H21027 When required to journal a database page, SQLite shall first append the page number of the page being journalled to the journal file, formatted as a 4-byte big-endian unsigned integer, using a single call to the xWrite method of the file-handle opened on the journal file.
H21028 When required to journal a database page, if the attempt to append the page number to the journal file is successful, then the current page data (page-size bytes) shall be appended to the journal file, using a single call to the xWrite method of the file-handle opened on the journal file.
H21029 When required to journal a database page, if the attempt to append the current page data to the journal file is successful, then SQLite shall append a 4-byte big-endian integer checksum value to the to the journal file, using a single call to the xWrite method of the file-handle opened on the journal file.
H21030 The checksum value written to the journal file by the write required by H21029 shall be equal to the sum of the checksum initializer field stored in the journal header (H21XXX) and every 200th byte of the page data, beginning with the (page-size % 200)th byte.
H21031 Unless a pending or exclusive lock has already been obtained, when SQLite is required to write out a page cache, it shall first upgrade the lock on the database file to a pending lock using a call to the xLock method of the file-handle open on the database file.
H21032 Unless one has already been obtained, when SQLite is required to write out a page cache, after successfully obtaining a pending lock it shall upgrade the lock on the database file to an exclusive lock using a call to the xLock method of the file-handle open on the database file.
H21033 When SQLite is required to write out a page cache, if the required exclusive lock is already held or successfully obtained, SQLite shall copy the contents of all pages that have been modified within the page cache to the database file, using a single write of page-size bytes for each.
H21034 When the modified contents of a page cache is copied into the database file, as required by H21033, the write operations shall occur in page number order, from lowest to highest.
H21035 When required to open a write transaction on the database, SQLite shall first open a read transaction, if the database connection in question has not already opened one.
H21036 When required to open a write transaction on the database, after ensuring a read transaction has already been opened, SQLite shall obtain a reserved lock on the database file by calling the xLock method of the file-handle open on the database file.
H21037 When required to open a write transaction on the database, after obtaining a reserved lock on the database file, SQLite shall open a read/write file-handle on the corresponding journal file.
H21038 When required to open a write transaction on the database, after opening a file-handle on the journal file, SQLite shall write a journal header into the first sector-size bytes of the journal file, using single call to the xWrite method of the recently opened file-handle.
H21039 The first 8 bytes of the journal header required to be written by H21038 shall be:
H21040 When a database connection is closed, SQLite shall close the associated file handle at the VFS level.
H40310 SQLite shall recognize as a VARIABLE token the a question-mark (u003f) followed by zero or more NUMERIC characters.
H40320 SQLite shall recognize as a VARIABLE token one of the characters at-sign (u0040), dollar-sign (u0024), or colon (u003a) followed by a parameter name.
H40330 SQLite shall recognize as a VARIABLE token the shape-sign (u0023) followed by a parameter name that does not begin with a NUMERIC character.
H41010 SQLite shall divide input SQL text into tokens working from left to right.
H41020 At each step in the SQL tokenization process, SQLite shall extract the longest possible token from the remaining input text.
H41030 The tokenizer shall pass each non-WHITESPACE token seen on to the parser in the order in which the tokens are seen.
H41040 When the tokenizer reaches the end of input where the last token sent to the parser was not a SEMI token, it shall send a SEMI token to the parser.
H41050 When the tokenizer encounters text that is not a valid token, it shall cause an error to be returned to the application.
H41100 SQLite shall recognize a sequence of one or more WHITESPACE characters as a WHITESPACE token.
H41110 SQLite shall recognize as a WHITESPACE token the two-character sequence "--" (u002d, u002d) followed by any sequence of non-zero characters up through and including the first u000a character or until end of input.
H41120 SQLite shall recognize as a WHITESPACE token the two-character sequence "/*" (u002f, u002a) followed by any sequence of zero or more non-zero characters through with the first "*/" (u002a, u002f) sequence or until end of input.
H41130 SQLite shall recognize as an ID token any sequence of characters that begins with an ALPHABETIC character and continue with zero or more ALPHANUMERIC characters and/or "$" (u0024) characters and which is not a keyword token.
H41140 SQLite shall recognize as an ID token any sequence of non-zero characters that begins with "[" (u005b) and continuing through the first "]" (u005d) character.
H41150 SQLite shall recognize as an ID token any sequence of characters that begins with a double-quote (u0022), is followed by zero or more non-zero characters and/or pairs of double-quotes (u0022) and terminates with a double-quote (u0022) that is not part of a pair.
H41160 SQLite shall recognize as an ID token any sequence of characters that begins with a grave accent (u0060), is followed by zero or more non-zero characters and/or pairs ofgrave accents (u0060) and terminates with a grave accent (u0022) that is not part of a pair.
H41200 SQLite shall recognize as a STRING token a sequence of characters that begins with a single-quote (u0027), is followed by zero or more non-zero characters and/or pairs of single-quotes (u0027) and terminates with a single-quote (u0027) that is not part of a pair.
H41210 SQLite shall recognize as a BLOB token an upper or lower-case "X" (u0058 or u0078) followed by a single-quote (u0027) followed by a number of HEXADECIMAL character that is a multiple of two and terminated by a single-quote (u0027).
H41220 SQLite shall recognize as an INTEGER token any squence of one or more NUMERIC characters.
H41230 SQLite shall recognize as a FLOAT token a sequence of one or more NUMERIC characters together with zero or one period (u002e) and followed by an exponentiation suffix.
H41240 SQLite shall recognize as a FLOAT token a sequence of one or more NUMERIC characters that includes exactly one period (u002e) character.
H41403 SQLite shall recognize the 1-character sequenence "-" (u002d) as token MINUS
H41406 SQLite shall recognize the 1-character sequenence "(" (u0028) as token LP
H41409 SQLite shall recognize the 1-character sequenence ")" (u0029) as token RP
H41412 SQLite shall recognize the 1-character sequenence ";" (u003b) as token SEMI
H41415 SQLite shall recognize the 1-character sequenence "+" (u002b) as token PLUS
H41418 SQLite shall recognize the 1-character sequenence "*" (u002a) as token STAR
H41421 SQLite shall recognize the 1-character sequenence "/" (u002f) as token SLASH
H41424 SQLite shall recognize the 1-character sequenence "%" (u0025) as token REM
H41427 SQLite shall recognize the 1-character sequenence "=" (u003d) as token EQ
H41430 SQLite shall recognize the 2-character sequenence "==" (u003d u003d) as token EQ
H41433 SQLite shall recognize the 2-character sequenence "<=" (u003c u003d) as token LE
H41436 SQLite shall recognize the 2-character sequenence "<>" (u003c u003e) as token NE
H41439 SQLite shall recognize the 2-character sequenence "<<" (u003c u003c) as token LSHIFT
H41442 SQLite shall recognize the 1-character sequenence "<" (u003c) as token LT
H41445 SQLite shall recognize the 2-character sequenence ">=" (u003e u003d) as token GE
H41448 SQLite shall recognize the 2-character sequenence ">>" (u003e u003e) as token RSHIFT
H41451 SQLite shall recognize the 1-character sequenence ">" (u003e) as token GT
H41454 SQLite shall recognize the 2-character sequenence "!=" (u0021 u003d) as token NE
H41457 SQLite shall recognize the 1-character sequenence "," (u002c) as token COMMA
H41460 SQLite shall recognize the 1-character sequenence "&" (u0026) as token BITAND
H41463 SQLite shall recognize the 1-character sequenence "~" (u007e) as token BITNOT
H41466 SQLite shall recognize the 1-character sequenence "|" (u007c) as token BITOR
H41469 SQLite shall recognize the 2-character sequenence "||" (u007c u007c) as token CONCAT
H41472 SQLite shall recognize the 1-character sequenence "." (u002e) as token DOT
H41503 SQLite shall recognize the 5-character sequenence "ABORT" in any combination of upper and lower caseletters as the keyword token ABORT
H41506 SQLite shall recognize the 3-character sequenence "ADD" in any combination of upper and lower caseletters as the keyword token ADD
H41509 SQLite shall recognize the 5-character sequenence "AFTER" in any combination of upper and lower caseletters as the keyword token AFTER
H41512 SQLite shall recognize the 3-character sequenence "ALL" in any combination of upper and lower caseletters as the keyword token ALL
H41515 SQLite shall recognize the 5-character sequenence "ALTER" in any combination of upper and lower caseletters as the keyword token ALTER
H41518 SQLite shall recognize the 7-character sequenence "ANALYZE" in any combination of upper and lower caseletters as the keyword token ANALYZE
H41521 SQLite shall recognize the 3-character sequenence "AND" in any combination of upper and lower caseletters as the keyword token AND
H41524 SQLite shall recognize the 2-character sequenence "AS" in any combination of upper and lower caseletters as the keyword token AS
H41527 SQLite shall recognize the 3-character sequenence "ASC" in any combination of upper and lower caseletters as the keyword token ASC
H41530 SQLite shall recognize the 6-character sequenence "ATTACH" in any combination of upper and lower caseletters as the keyword token ATTACH
H41533 SQLite shall recognize the 13-character sequenence "AUTOINCREMENT" in any combination of upper and lower caseletters as the keyword token AUTOINCR
H41536 SQLite shall recognize the 6-character sequenence "BEFORE" in any combination of upper and lower caseletters as the keyword token BEFORE
H41539 SQLite shall recognize the 5-character sequenence "BEGIN" in any combination of upper and lower caseletters as the keyword token BEGIN
H41542 SQLite shall recognize the 7-character sequenence "BETWEEN" in any combination of upper and lower caseletters as the keyword token BETWEEN
H41545 SQLite shall recognize the 2-character sequenence "BY" in any combination of upper and lower caseletters as the keyword token BY
H41548 SQLite shall recognize the 7-character sequenence "CASCADE" in any combination of upper and lower caseletters as the keyword token CASCADE
H41551 SQLite shall recognize the 4-character sequenence "CASE" in any combination of upper and lower caseletters as the keyword token CASE
H41554 SQLite shall recognize the 4-character sequenence "CAST" in any combination of upper and lower caseletters as the keyword token CAST
H41557 SQLite shall recognize the 5-character sequenence "CHECK" in any combination of upper and lower caseletters as the keyword token CHECK
H41560 SQLite shall recognize the 7-character sequenence "COLLATE" in any combination of upper and lower caseletters as the keyword token COLLATE
H41563 SQLite shall recognize the 6-character sequenence "COLUMN" in any combination of upper and lower caseletters as the keyword token COLUMNKW
H41566 SQLite shall recognize the 6-character sequenence "COMMIT" in any combination of upper and lower caseletters as the keyword token COMMIT
H41569 SQLite shall recognize the 8-character sequenence "CONFLICT" in any combination of upper and lower caseletters as the keyword token CONFLICT
H41572 SQLite shall recognize the 10-character sequenence "CONSTRAINT" in any combination of upper and lower caseletters as the keyword token CONSTRAINT
H41575 SQLite shall recognize the 6-character sequenence "CREATE" in any combination of upper and lower caseletters as the keyword token CREATE
H41578 SQLite shall recognize the 5-character sequenence "CROSS" in any combination of upper and lower caseletters as the keyword token JOIN_KW
H41581 SQLite shall recognize the 12-character sequenence "CURRENT_DATE" in any combination of upper and lower caseletters as the keyword token CTIME_KW
H41584 SQLite shall recognize the 12-character sequenence "CURRENT_TIME" in any combination of upper and lower caseletters as the keyword token CTIME_KW
H41587 SQLite shall recognize the 17-character sequenence "CURRENT_TIMESTAMP" in any combination of upper and lower caseletters as the keyword token CTIME_KW
H41590 SQLite shall recognize the 8-character sequenence "DATABASE" in any combination of upper and lower caseletters as the keyword token DATABASE
H41593 SQLite shall recognize the 7-character sequenence "DEFAULT" in any combination of upper and lower caseletters as the keyword token DEFAULT
H41596 SQLite shall recognize the 8-character sequenence "DEFERRED" in any combination of upper and lower caseletters as the keyword token DEFERRED
H41599 SQLite shall recognize the 10-character sequenence "DEFERRABLE" in any combination of upper and lower caseletters as the keyword token DEFERRABLE
H41602 SQLite shall recognize the 6-character sequenence "DELETE" in any combination of upper and lower caseletters as the keyword token DELETE
H41605 SQLite shall recognize the 4-character sequenence "DESC" in any combination of upper and lower caseletters as the keyword token DESC
H41608 SQLite shall recognize the 6-character sequenence "DETACH" in any combination of upper and lower caseletters as the keyword token DETACH
H41611 SQLite shall recognize the 8-character sequenence "DISTINCT" in any combination of upper and lower caseletters as the keyword token DISTINCT
H41614 SQLite shall recognize the 4-character sequenence "DROP" in any combination of upper and lower caseletters as the keyword token DROP
H41617 SQLite shall recognize the 3-character sequenence "END" in any combination of upper and lower caseletters as the keyword token END
H41620 SQLite shall recognize the 4-character sequenence "EACH" in any combination of upper and lower caseletters as the keyword token EACH
H41623 SQLite shall recognize the 4-character sequenence "ELSE" in any combination of upper and lower caseletters as the keyword token ELSE
H41626 SQLite shall recognize the 6-character sequenence "ESCAPE" in any combination of upper and lower caseletters as the keyword token ESCAPE
H41629 SQLite shall recognize the 6-character sequenence "EXCEPT" in any combination of upper and lower caseletters as the keyword token EXCEPT
H41632 SQLite shall recognize the 9-character sequenence "EXCLUSIVE" in any combination of upper and lower caseletters as the keyword token EXCLUSIVE
H41635 SQLite shall recognize the 6-character sequenence "EXISTS" in any combination of upper and lower caseletters as the keyword token EXISTS
H41638 SQLite shall recognize the 7-character sequenence "EXPLAIN" in any combination of upper and lower caseletters as the keyword token EXPLAIN
H41641 SQLite shall recognize the 4-character sequenence "FAIL" in any combination of upper and lower caseletters as the keyword token FAIL
H41644 SQLite shall recognize the 3-character sequenence "FOR" in any combination of upper and lower caseletters as the keyword token FOR
H41647 SQLite shall recognize the 7-character sequenence "FOREIGN" in any combination of upper and lower caseletters as the keyword token FOREIGN
H41650 SQLite shall recognize the 4-character sequenence "FROM" in any combination of upper and lower caseletters as the keyword token FROM
H41653 SQLite shall recognize the 4-character sequenence "FULL" in any combination of upper and lower caseletters as the keyword token JOIN_KW
H41656 SQLite shall recognize the 4-character sequenence "GLOB" in any combination of upper and lower caseletters as the keyword token LIKE_KW
H41659 SQLite shall recognize the 5-character sequenence "GROUP" in any combination of upper and lower caseletters as the keyword token GROUP
H41662 SQLite shall recognize the 6-character sequenence "HAVING" in any combination of upper and lower caseletters as the keyword token HAVING
H41665 SQLite shall recognize the 2-character sequenence "IF" in any combination of upper and lower caseletters as the keyword token IF
H41668 SQLite shall recognize the 6-character sequenence "IGNORE" in any combination of upper and lower caseletters as the keyword token IGNORE
H41671 SQLite shall recognize the 9-character sequenence "IMMEDIATE" in any combination of upper and lower caseletters as the keyword token IMMEDIATE
H41674 SQLite shall recognize the 2-character sequenence "IN" in any combination of upper and lower caseletters as the keyword token IN
H41677 SQLite shall recognize the 5-character sequenence "INDEX" in any combination of upper and lower caseletters as the keyword token INDEX
H41680 SQLite shall recognize the 9-character sequenence "INITIALLY" in any combination of upper and lower caseletters as the keyword token INITIALLY
H41683 SQLite shall recognize the 5-character sequenence "INNER" in any combination of upper and lower caseletters as the keyword token JOIN_KW
H41686 SQLite shall recognize the 6-character sequenence "INSERT" in any combination of upper and lower caseletters as the keyword token INSERT
H41689 SQLite shall recognize the 7-character sequenence "INSTEAD" in any combination of upper and lower caseletters as the keyword token INSTEAD
H41692 SQLite shall recognize the 9-character sequenence "INTERSECT" in any combination of upper and lower caseletters as the keyword token INTERSECT
H41695 SQLite shall recognize the 4-character sequenence "INTO" in any combination of upper and lower caseletters as the keyword token INTO
H41698 SQLite shall recognize the 2-character sequenence "IS" in any combination of upper and lower caseletters as the keyword token IS
H41701 SQLite shall recognize the 6-character sequenence "ISNULL" in any combination of upper and lower caseletters as the keyword token ISNULL
H41704 SQLite shall recognize the 4-character sequenence "JOIN" in any combination of upper and lower caseletters as the keyword token JOIN
H41707 SQLite shall recognize the 3-character sequenence "KEY" in any combination of upper and lower caseletters as the keyword token KEY
H41710 SQLite shall recognize the 4-character sequenence "LEFT" in any combination of upper and lower caseletters as the keyword token JOIN_KW
H41713 SQLite shall recognize the 4-character sequenence "LIKE" in any combination of upper and lower caseletters as the keyword token LIKE_KW
H41716 SQLite shall recognize the 5-character sequenence "LIMIT" in any combination of upper and lower caseletters as the keyword token LIMIT
H41719 SQLite shall recognize the 5-character sequenence "MATCH" in any combination of upper and lower caseletters as the keyword token MATCH
H41722 SQLite shall recognize the 7-character sequenence "NATURAL" in any combination of upper and lower caseletters as the keyword token JOIN_KW
H41725 SQLite shall recognize the 3-character sequenence "NOT" in any combination of upper and lower caseletters as the keyword token NOT
H41728 SQLite shall recognize the 7-character sequenence "NOTNULL" in any combination of upper and lower caseletters as the keyword token NOTNULL
H41731 SQLite shall recognize the 4-character sequenence "NULL" in any combination of upper and lower caseletters as the keyword token NULL
H41734 SQLite shall recognize the 2-character sequenence "OF" in any combination of upper and lower caseletters as the keyword token OF
H41737 SQLite shall recognize the 6-character sequenence "OFFSET" in any combination of upper and lower caseletters as the keyword token OFFSET
H41740 SQLite shall recognize the 2-character sequenence "ON" in any combination of upper and lower caseletters as the keyword token ON
H41743 SQLite shall recognize the 2-character sequenence "OR" in any combination of upper and lower caseletters as the keyword token OR
H41746 SQLite shall recognize the 5-character sequenence "ORDER" in any combination of upper and lower caseletters as the keyword token ORDER
H41749 SQLite shall recognize the 5-character sequenence "OUTER" in any combination of upper and lower caseletters as the keyword token JOIN_KW
H41752 SQLite shall recognize the 4-character sequenence "PLAN" in any combination of upper and lower caseletters as the keyword token PLAN
H41755 SQLite shall recognize the 6-character sequenence "PRAGMA" in any combination of upper and lower caseletters as the keyword token PRAGMA
H41758 SQLite shall recognize the 7-character sequenence "PRIMARY" in any combination of upper and lower caseletters as the keyword token PRIMARY
H41761 SQLite shall recognize the 5-character sequenence "QUERY" in any combination of upper and lower caseletters as the keyword token QUERY
H41764 SQLite shall recognize the 5-character sequenence "RAISE" in any combination of upper and lower caseletters as the keyword token RAISE
H41767 SQLite shall recognize the 10-character sequenence "REFERENCES" in any combination of upper and lower caseletters as the keyword token REFERENCES
H41770 SQLite shall recognize the 6-character sequenence "REGEXP" in any combination of upper and lower caseletters as the keyword token LIKE_KW
H41773 SQLite shall recognize the 7-character sequenence "REINDEX" in any combination of upper and lower caseletters as the keyword token REINDEX
H41776 SQLite shall recognize the 6-character sequenence "RENAME" in any combination of upper and lower caseletters as the keyword token RENAME
H41779 SQLite shall recognize the 7-character sequenence "REPLACE" in any combination of upper and lower caseletters as the keyword token REPLACE
H41782 SQLite shall recognize the 8-character sequenence "RESTRICT" in any combination of upper and lower caseletters as the keyword token RESTRICT
H41785 SQLite shall recognize the 5-character sequenence "RIGHT" in any combination of upper and lower caseletters as the keyword token JOIN_KW
H41788 SQLite shall recognize the 8-character sequenence "ROLLBACK" in any combination of upper and lower caseletters as the keyword token ROLLBACK
H41791 SQLite shall recognize the 3-character sequenence "ROW" in any combination of upper and lower caseletters as the keyword token ROW
H41794 SQLite shall recognize the 6-character sequenence "SELECT" in any combination of upper and lower caseletters as the keyword token SELECT
H41797 SQLite shall recognize the 3-character sequenence "SET" in any combination of upper and lower caseletters as the keyword token SET
H41800 SQLite shall recognize the 5-character sequenence "TABLE" in any combination of upper and lower caseletters as the keyword token TABLE
H41803 SQLite shall recognize the 4-character sequenence "TEMP" in any combination of upper and lower caseletters as the keyword token TEMP
H41806 SQLite shall recognize the 9-character sequenence "TEMPORARY" in any combination of upper and lower caseletters as the keyword token TEMP
H41809 SQLite shall recognize the 4-character sequenence "THEN" in any combination of upper and lower caseletters as the keyword token THEN
H41812 SQLite shall recognize the 2-character sequenence "TO" in any combination of upper and lower caseletters as the keyword token TO
H41815 SQLite shall recognize the 11-character sequenence "TRANSACTION" in any combination of upper and lower caseletters as the keyword token TRANSACTION
H41818 SQLite shall recognize the 7-character sequenence "TRIGGER" in any combination of upper and lower caseletters as the keyword token TRIGGER
H41821 SQLite shall recognize the 5-character sequenence "UNION" in any combination of upper and lower caseletters as the keyword token UNION
H41824 SQLite shall recognize the 6-character sequenence "UNIQUE" in any combination of upper and lower caseletters as the keyword token UNIQUE
H41827 SQLite shall recognize the 6-character sequenence "UPDATE" in any combination of upper and lower caseletters as the keyword token UPDATE
H41830 SQLite shall recognize the 5-character sequenence "USING" in any combination of upper and lower caseletters as the keyword token USING
H41833 SQLite shall recognize the 6-character sequenence "VACUUM" in any combination of upper and lower caseletters as the keyword token VACUUM
H41836 SQLite shall recognize the 6-character sequenence "VALUES" in any combination of upper and lower caseletters as the keyword token VALUES
H41839 SQLite shall recognize the 4-character sequenence "VIEW" in any combination of upper and lower caseletters as the keyword token VIEW
H41842 SQLite shall recognize the 7-character sequenence "VIRTUAL" in any combination of upper and lower caseletters as the keyword token VIRTUAL
H41845 SQLite shall recognize the 4-character sequenence "WHEN" in any combination of upper and lower caseletters as the keyword token WHEN
H41848 SQLite shall recognize the 5-character sequenence "WHERE" in any combination of upper and lower caseletters as the keyword token WHERE
H42000 The SQLite parser shall accept SQL statements consisting of an SQL command followed by a semicolon.
sql_statement ::= cmd SEMI.
H420012 A token received by the parser shall be converted into an ANY token if the original token value would have resulted in a syntax error and if a token value of ANY will allow the parse to continue.
H42002 The preparation of an SQL statement that is not accepted by the SQLite parser shall fail with an error.
H42004 SQLite shall use the built-in NOCASE collating sequence when comparing identifiers and datatype names within SQL statements during statement preparation.
H42008 A token received by the parser shall be converted into an ID token if the original token value would have resulted in a syntax error, a token value of ID will allow the parse to continue, and if the original token value was one of: ABORT AFTER ANALYZE ASC ATTACH BEFORE BEGIN CASCADE CAST CONFLICT CTIME_KW DATABASE DEFERRED DESC DETACH EACH END EXCEPT EXCLUSIVE EXPLAIN FAIL FOR IF IGNORE IMMEDIATE INITIALLY INSTEAD INTERSECT KEY LIKE_KW MATCH OF OFFSET PLAN PRAGMA QUERY RAISE REINDEX RENAME REPLACE RESTRICT ROW TEMP TRIGGER UNION VACUUM VIEW VIRTUAL
H42010 The SQLite parser shall accept BEGIN statements that conform to the following syntax:
cmd ::= BEGIN transaction_type transaction_name.
transaction_type ::= .
transaction_type ::= DEFERRED.
transaction_type ::= IMMEDIATE.
transaction_type ::= EXCLUSIVE.
transaction_name ::= .
transaction_name ::= TRANSACTION.
transaction_name ::= TRANSACTION name.
H42013 The successful evaluation of a BEGIN statement shall cause the database connection to exit autocommit mode.
H42016 The evaluation of a BEGIN TRANSACTION statement shall fail with an error if the database connection is not in autocommit mode at the start of evaluation.
H42019 If the transaction_type keyword is omitted from a BEGIN TRANSACTION statement then the behavior shall be the same as if the DEFERRED keyword were used.
H42022 When the DEFERRED keyword appears in a BEGIN statement the locking state of the underlying database files shall be the same before and after the statement is evaluated.
H42025 When the IMMEDIATE keyword appears in a BEGIN statement then successful evaluation of the statement shall cause a RESERVED lock to be obtained for all underlying database files.
H42028 When the EXCLUSIVE keyword appears in a BEGIN statement then successful evaluation of the statement shall cause a EXCLUSIVE lock to be obtained for all underlying database files.
H42110 SQLite shall accept the following COMMIT statement syntax:
cmd ::= COMMIT transaction_name.
cmd ::= END transaction_name.
H42113 The successful evaluation of COMMIT statement places the database connection in autocommit mode.
H42116 If a database connection is already in autocommit mode when a COMMIT statement is evaluated, then the statement shall fail with an error.
H42210 The SQLite parser shall accept ROLLBACK statements that conform to the following syntax:
cmd ::= ROLLBACK transaction_name.
H42213 The successful evaluation of ROLLBACK statement places the database connection in autocommit mode.
H42216 If a database connection is already in autocommit mode when a ROLLBACK statement is invoked, then the statement invocation shall fail with an error.
H42222 Other pending statements on the same database connection as a successfully evaluated ROLLBACK statement shall be aborted.
H42225 The successful evaluation of a ROLLBACK statement causes the current transaction on the database connection to roll back.
H42310 The SQLite parser shall accept CREATE TABLE statements that conform to the following syntax:
cmd ::= CREATE temp TABLE ifnotexists fullname table_definition.
temp ::= .
temp ::= TEMP.
ifnotexists ::= .
ifnotexists ::= IF NOT EXISTS.
H42313 When the TEMP keyword appears in a CREATE TABLE statement and the databasename exists and is something other than "temp", then the preparation of the CREATE TABLE statement shall fail with an error.
H42316 When the TEMP keyword appears in a CREATE TABLE statement the behavior shall be as if the databasename where "temp".
H42319 The successful evaluation of a CREATE TABLE statement shall cause a new SQL table whose name is given by the objectname to be created in the schema of the database whose name is given by the databasename.
H42322 If a CREATE TABLE statement specifies no databasename and omits the TEMP keyword then the behavior shall be as if a databasename of "main" where used.
H42325 The preparation of a CREATE TABLE statement shall fail with an error if the IF NOT EXISTS clause is omitted and the objectname is the same as the name of a table or view in the same database.
H42328 The evaluation of a CREATE TABLE statement shall be a silent no-op if the IF NOT EXISTS clause is present and the objectname is the same as the name of a table or view in the same database.
H42331 The preparation of a CREATE TABLE statement shall fail with an error if the the objectname is the same as the name of an index in any database attached to the same database connection.
H42334 The preparation of a CREATE TABLE statement shall fail with an error if the the databasename references a database that is not attached to the same database connection.
H42410 The SQLite parser shall accept the following syntax for the table_definition section of a CREATE TABLE statement:
table_definition ::= LP columnlist constraint_opt RP.
columnlist ::= column.
columnlist ::= columnlist COMMON column.
constraint_opt ::= .
constraint_opt ::= COMMA constraint_list.
H42413 The SQLite parser shall accept the following syntax for the column component of a table_definition.
column ::= name column_type column_constraint_list.
column_type ::= .
column_type ::= typename.
column_type ::= typename LP signed_int RP.
column_type ::= typename LP signed_int COMMA signed_int RP.
typename ::= identifier.
typename ::= typename identifier.
signed_int ::= INTEGER.
signed_int ::= MINUS INTEGER.
signed_int ::= PLUS INTEGER.
H42416 The preparation of an ordinary CREATE TABLE statement shall fail with an error if it specifies two or more columns with the same name.
H42419 The datatype affinity of each column in a table generate by an ordinary CREATE TABLE statement shall be determined from the column_type text using the following 5-step algorithm:
  1. If the column_type contains the string "INT" then the affinity is INTEGER.

  2. Else if the column_type contains one of the strings "CHAR", "CLOB", or "TEXT" then the affinity is TEXT.

  3. Else if the column_type contains the string "BLOB" or is omitted then the affinity is NONE.

  4. Else if the column_type constains one of the strings "REAL", "FLOA", or "DOUB" then the affinity is REAL.

  5. Otherwise the affinity is NUMERIC.

H42450 The SQLite parser shall accept the following syntax for the list of column constraints and modifiers that follows a column definition in an ordinary CREATE TABLE statement.
column_constraint_list ::= .
column_constraint_list ::= column_constraint_list named_column_constraint.
named_column_constraint ::= CONSTRAINT name column_constraint.
named_column_constraint ::= column_constraint.
column_constraint ::= DEFAULT term.
column_constraint ::= DEFAULT identifier.
column_constraint ::= DEFAULT PLUS term.
column_constraint ::= DEFAULT MINUS term.
column_constraint ::= DEFAULT LP expr RP.
column_constraint ::= NULL conflict.
column_constraint ::= NOT NULL conflict.
column_constraint ::= PRIMARY KEY sortorder conflict autoincr.
column_constraint ::= UNIQUE conflict.
column_constraint ::= CHECK LP expr RP.
column_constraint ::= COLLATE identifier.
column_constraint ::= foreign_key_constraint.
column_constraint ::= deferrable_constraint.
autoincr ::= .
autoincr ::= AUTOINCR.
indexlist_opt ::= .
indexlist_opt ::= LP indexlist RP.
conflict ::= .
conflict ::= ON CONFLICT IGNORE.
conflict ::= ON CONFLICT REPLACE.
conflict ::= ON CONFLICT ABORT.
conflict ::= ON CONFLICT FAIL.
conflict ::= ON CONFLICT ROLLBACK.
H42453 When a column as a DEFAULT constraint, the default value for the column shall be the value specified by that constraint.
H42456 If a column has no DEFAULT constraint then the default value for that column shall be NULL.
H42459 If a column has no NOT NULL constraint then the NULL conflict resolution behavior for the column shall be NONE.
H42462 If a column has a NOT NULL constraint and that constrait lacks an ON CONFLICT clause then the null-conflict resolution behavior for the column shall be ABORT.
H42465 If a column has a NOT NULL constraint and that constraint has an ON CONFLICT clause then the null-conflict resolution behavior for the column shall be the behavior specified by the ON CONFLICT clause.
H42467 A column without a COLLATE constraint shall have a default collating sequence of BINARY.
H42468 A column with a COLLATE constraint shall have a default collating sequence as specified by the COLLATE constraint.
H42470 If the datatype of a single-column PRIMARY KEY is exactly "INTEGER" then the name of that column shall be an alias for the table rowid.
H42472 If a table contains no column named "ROWID" then "ROWID" shall be an alias for the table rowid.
H42474 If a table contains no column named "OID" then "OID" shall be an alias for the table rowid.
H42476 If a table contains no column named "_ROWID_" then "_ROWID_" shall be an alias for the table rowid.
H42478 A table shall have an autoincrementing rowid if and only if the PRIMARY KEY for the table is an alias for the rowid and the PRIMARY KEY declaration uses the AUTOINCR keyword.
H42480 Successful evaluation of a CREATE TABLE statement shall create an index for every UNIQUE constraint where the created index has a conflict resolution algorithm as specified by the ON CONFLICT clause of the UNIQUE constraint or a conflict resolution algorithm of ABORT if there is no ON CONFLICT clause on the constraint.
H42510 The SQLite parser shall accept the following syntax for the list of table contraints that occurs at the end of an ordinary CREATE TABLE statement.
constraint_list ::= constraint.
constraint_list ::= constraint_list constraint.
constraint_list ::= constraint_list COMMA constraint.
constraint ::= CHECK LP expr RP conflict.
constraint ::= CONSTRAINT name.
constraint ::= FOREIGN KEY LP columnlist RP foreign_key_constraint defer_opt.
constraint ::= PRIMARY KEY LP indexlist autoinc RP conflict.
constraint ::= UNIQUE LP indexlist RP conflict.
H42513 The preparation of a CREATE TABLE statement that contains more than one PRIMARY KEY constraint shall fail with an error.
H42516 The preparation of a CREATE TABLE statement that contains a CHECK constraint that uses a subquery shall fail with an error.
H42517 The preparation of a CREATE TABLE statement that contains a CHECK constraint that uses a parameter shall fail with an error.
H42518 Name resolution of the expr with each CHECK constraint of a CREATE TABLE statement shall be carried out using a name context with an empty result set and a source set holding single source element that is the table being created.
H42521 The preparation of a CREATE TABLE statement that contains a DEFAULT constraint with an non-constant expression shall fail with an error.
H42536 A PRIMARY KEY constraint that does not result in a rowid alias shall have the same effect as a UNIQUE constraint.
H42539 Preparation of a CREATE TABLE statement shall fail with an error if the indexlist of either a table PRIMARY KEY or a table UNIQUE constraint references a column that is not a column in the table.
H42570 The SQLite parser shall accept the following syntax for a foreign key constraint as either a separate constraint or as part of a column constraint in an ordinary CREATE TABLE statement.
foreign_key_constraint ::= REFERENCES name indexlist_opt fkarglist.
defer_opt ::= .
defer_opt ::= deferrable_constraint.
deferrable_constraint ::= NOT DEFERRABLE initially_deferred_clause.
deferrable_constraint ::= DEFERRABLE initially_deferred_clause.
fkarglist ::= .
fkarglist ::= fkarglist fkarg.
fkarg ::= MATCH name.
fkarg ::= ON DELETE fkaction.
fkarg ::= ON UPDATE fkaction.
fkarg ::= ON INSERT fkaction.
fkaction ::= SET NULL.
fkaction ::= SET DEFAULT.
fkaction ::= CASCADE.
fkaction ::= RESTRICT.
initially_deferred_clause ::= .
initially_deferred_clause ::= INITIALLY DEFERRED.
initially_deferred_clause ::= INITIALLY IMMEDIATE.
H42610 The SQLite parser shall accept the following syntax for creating new database tables from the result set of SELECT statements.
table_definition ::= AS select.
H42613 The table generated by a CREATE TABLE AS statement shall have the same number of columns as the result set of the SELECT.
H42616 The names of the columns in a table generated by a CREATE TABLE AS statement shall have base names which are the names of the columns in the result set of the SELECT statement
H42617 Each column name in a table generated by a CREATE TABLE AS statement shall have an arbitrary suffix appended to its basename if and only if such a suffix is necessary to make the name distinct from all preceding column names in the table.
H42619 All columns in a table generated by a CREATE TABLE AS statement shall have a default value of NULL.
H42622 All columns in a table generated by a CREATE TABLE AS statement shall have a NULL conflict resolution behavior of NONE.
H42625 All columns in a table generated by a CREATE TABLE AS statement shall have an affinity of NONE.
H42628 All columns in a table generated by a CREATE TABLE AS statement shall have a default collating sequence of BINARY.
H42700 The SQLite parser shall accept DROP TABLE statements that conform to the following syntax.
cmd ::= DROP TABLE ifexists fullname.
ifexists ::= .
ifexists ::= IF EXISTS.
H42710 The preparation of a DROP TABLE statement shall fail with an error if the statement lacks an IF EXISTS clause and the fullname does not reference a existing table.
H42713 The evaluation of a DROP TABLE statement shall be a silent no-op if the the statement has an IF EXISTS clause and the fullname does not reference a existing table.
H42716 The successful evaluation of a DROP TABLE statement shall cause the table identified by fullname to be removed from its database and discarded.
H42719 The successful evaluation of a DROP TABLE statement shall cause all indices attached to the table identified by fullname to be removed from their database and discarded.
H42721 The successful evaluation of a DROP TABLE statement shall cause all triggers attached to the table identified by fullname to be removed from their database and discarded.
H42724 The preparation of a DROP TABLE statement shall fail with an error if fullname is a system table.
H42800 The SQLite parser shall accept CREATE INDEX statements that conform to the following syntax:
cmd ::= CREATE unique INDEX ifnotexists fullname ON tablename LP indexlist RP.
tablename ::= name.
indexlist ::= indexlist COMMA columnname collate sortorder.
indexlist ::= columnname collate sortorder.
columnname ::= name.
collate ::= .
collate ::= COLLATE identifier.
sortorder ::= .
sortorder ::= ASC.
sortorder ::= DESC.
H42803 The target database of a CREATE INDEX statement shall be the databasename specified in the fullname term of the statement if the databasename exists.
H42806 If the fullname term of a CREATE INDEX statement does not specify a databasename and the tablename references a table that is in the "temp" database, then the target database for the statement shall be "temp".
H42809 If the fullname term of a CREATE INDEX statement does not specify a databasename and the tablename references a table that is not in the "temp" database, then the target database for the statement shall be "main".
H42812 The preparation of a CREATE INDEX statement shall fail with an error if the databasename of the fullname exists and references a database that is not attached to the same database connection.
H42815 The preparation of a CREATE INDEX statement shall fail with an error if the tablename does not reference an ordinary table in the database of the statement.
H42818 A successful evaluation of a CREATE INDEX statement shall create a new index called objectname in the database of the statement and attached to the table identified by tablename in that same database.
H42821 An index generated by a CREATE INDEX statement that omits the UNIQUE keyword shall have a conflict resolution behavior of NONE.
H42824 An index generated by a CREATE INDEX statement that includes the UNIQUE keyword shall have a conflict resolution behavior of ABORT.
H42830 The preparation of a CREATE INDEX statement shall fail with an error if any columnname value within the indexlist is not the name of one of the columns of the tablename table.
H42833 The collating sequence for each column of an index shall be the collating sequence specified in the indexlist.
H42836 If an index column does not specify a collating sequence then the collating sequence shall be the default collating sequence of the corresponding table column.
H42839 The sort order for an index column shall be descending if and only if the DESC keyword is used in the indexlist entry for that term.
H42842 The preparation of a CREATE INDEX statement shall fail with an error if the tablename refers to a system table.
H42900 The SQLite parser shall accept DROP INDEX statements that conform to the following syntax:
cmd ::= DROP INDEX ifexists fullname.
H42910 The preparation of a DROP INDEX statement shall fail with an error if the statement lacks an IF EXISTS clause and the fullname does not reference a existing index.
H42913 The evaluation of a DROP INDEX statement shall be a silent no-op if the the statement has an IF EXISTS clause and the fullname does not reference a existing index.
H42916 The successful evaluation of a DROP INDEX statement shall cause the index identified by fullname to be removed from its database and discarded.
H43100 The SQLite parser shall accept CREATE VIEW statements that conform to the following syntax:
cmd ::= CREATE temp VIEW ifnotexists fullname AS select.
H43113 When the TEMP keyword appears in a CREATE VIEW statement and the databasename exists and is something other than "temp", then the preparation of the CREATE VIEW statement shall fail with an error.
H43116 When the TEMP keyword appears in a CREATE VIEW statement the behavior shall be as if the databasename where "temp".
H43119 The successful evaluation of a CREATE VIEW statement shall cause a new view whose name is given by the objectname and is located in the schema of the database whose name is given by the databasename.
H43122 If a CREATE VIEW statement specifies no databasename and omits the TEMP keyword then the behavior shall be as if a databasename of "main" where used.
H43125 The preparation of a CREATE VIEW statement shall fail with an error if the IF NOT EXISTS clause is omitted and the objectname is the same as the name of a table or view in the same database.
H43128 The evaluation of a CREATE VIEW statement shall be a silent no-op if the IF NOT EXISTS clause is present and the objectname is the same as the name of a table or view in the same database.
H43131 The preparation of a CREATE VIEW statement shall fail with an error if the the objectname is the same as the name of an index in any database attached to the same database connection.
H43200 The SQLite parser shall accept DROP VIEW statements that conform to the following syntax:
cmd ::= DROP VIEW ifexists fullname.
H43204 The preparation of a DROP VIEW statement shall fail with an error if the statement lacks an IF EXISTS clause and the fullname does not reference a existing view.
H43207 The evaluation of a DROP VIEW statement shall be a silent no-op if the the statement has an IF EXISTS clause and the fullname does not reference a existing view.
H43211 The successful evaluation of a DROP VIEW statement shall cause the view identified by fullname to be removed from its database and discarded.
H43214 The successful evaluation of a DROP VIEW statement shall cause all triggers attached to the view identified by fullname to be removed from their database and discarded.
H43234 The preparation of a CREATE VIEW statement shall fail with an error if the the databasename references a database that is not attached to the same database connection.
H43237 The view generated by a CREATE VIEW statement shall have the same number of columns as the result set of the SELECT.
H43241 The names of the columns in a view generated by a CREATE VIEW statement shall have base names which are the names of the columns in the result set of the SELECT statement
H43244 Each column name in a table generated by a CREATE VIEW statement shall have an arbitrary suffix appended to its basename if and only if such a suffix is necessary to make the name distinct from all preceding column names in the view.
H43300 The SQLite parser shall accept CREATE TRIGGER statements that conform to the following syntax:
cmd ::= CREATE temp TRIGGER ifnotexists fullname trigger trigger_body.
trigger ::= trigger_time trigger_event foreach_clause when_clause.
trigger_body ::= BEGIN trigger_cmd_list END.
trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI.
trigger_cmd_list ::= trigger_cmd_list.
trigger_cmd ::= DELETE FROM tablename where.
trigger_cmd ::= update_cmd tablename SET setlist where.
trigger_cmd ::= insert_cmd INTO tablename columnlist_opt VALUES LP exprlist RP.
trigger_cmd ::= insert_cmd INTO tablename columnlist_opt select.
trigger_cmd ::= select.
trigger_event ::= DELETE ON trigger_target.
trigger_event ::= INSERT ON trigger_target.
trigger_event ::= UPDATE OF columnlist ON trigger_target.
trigger_event ::= UPDATE ON trigger_target.
trigger_target ::= fullname.
trigger_time ::= AFTER.
trigger_time ::= BEFORE.
trigger_time ::= INSTEAD OF.
trigger_time ::=.
foreach_clause ::= FOR EACH ROW.
foreach_clause ::=.
when_clause ::= WHEN expr.
when_clause ::=.
H43303 When the TEMP keyword appears in a CREATE TRIGGER statement and the databasename of the fullname exists then the preparation of the statement shall fail with an error.
H43306 When the TEMP keyword appears in a CREATE TRIGGER statement the target database of the trigger shall be "temp".
H43309 When the TEMP keyword is omitted in a CREATE TRIGGER statement and the databasename of the fullname is omitted then the target database of the trigger shall be "main".
H43312 When the databasename of fullname in a CREATE TRIGGER statement exists, then the target database shall be the database named by databasename.
H43315 If a CREATE TRIGGER does not specify a trigger_time then the trigger_time shall be BEFORE.
H43318 The preparation of a CREATE TRIGGER statement shall fail with an error the trigger_time is INSTEAD OF and trigger_target is not the name of view in the target database.
H43321 The preparation of a CREATE TRIGGER statement shall fail with an error the trigger_time is not INSTEAD OF and trigger_target is not the name of an ordinary table in the target database.
H43324 The preparation of a CREATE TRIGGER statement shall fail with an error if the trigger_target is a system table.
H43500 The SQLite parser shall accept DROP TRIGGER statements that conform to the following syntax:
cmd ::= DROP TRIGGER ifexists fullname.
H43504 The preparation of a DROP TRIGGER statement shall fail with an error if the statement lacks an IF EXISTS clause and the fullname does not reference a existing trigger.
H43507 The evaluation of a DROP TRIGGER statement shall be a silent no-op if the the statement has an IF EXISTS clause and the fullname does not reference a existing trigger.
H43511 The successful evaluation of a DROP TRIGGER statement shall cause the trigger identified by fullname to be removed from its database and discarded.
H43514 The successful evaluation of a DROP TRIGGER statement shall cause all triggers attached to the trigger identified by fullname to be removed from their database and discarded.
H43600 The SQLite parser shall accept CREATE VIRTUAL TABLE statements that conform to the following syntax.
cmd ::= CREATE VIRTUAL TABLE fullname USING name vtab_arg_list.
vtab_arg_list ::= .
vtab_arg_list ::= LP vtab_arg_token RP.
vtab_arg_token ::= ANY.
vtab_arg_token ::= LP anylist RP.
anylist ::= .
anylist ::= anylist ANY.
H43700 The SQLite parser shall accept ALTER TABLE RENAME statements that conform to the following syntax:
cmd ::= ALTER TABLE fullname RENAME TO name.
H43750 The SQLite parser shall accept ALTER TABLE ADD COLUMN statements that conform to the following syntax:
cmd ::= ALTER TABLE fullname ADD column_keyword column.
column_keyword ::= .
column_keyword ::= COLUMNKW.
H43810 The SQLite parser shall accept INSERT statements that conform to the following syntax:
cmd ::= insert_cmd INTO fullname columnlist_opt insert_content.
insert_cmd ::= INSERT.
insert_cmd ::= REPLACE.
insert_cmd ::= INSERT OR REPLACE.
insert_cmd ::= INSERT OR IGNORE.
insert_cmd ::= INSERT OR ABORT.
insert_cmd ::= INSERT OR FAIL.
insert_cmd ::= INSERT OR ROLLBACK.
columnlist_opt ::= .
columnlist_opt ::= LP columnlist RP.
columnlist ::= columnname.
columnlist ::= columnlist COMMA columnname.
H43813 The preparation of an INSERT statement shall fail with an error if the instcolist contains a reference to a column which is not a column in the table identified by fullname and is not one of the special column named "ROWID", "OID", or "_ROWID_".
H43816 The preparation of an INSERT statement shall fail with an error if fullname does not identify either a view with an INSTEAD OF INSERT trigger or a table.
H43819 The preparation of an INSERT statement shall fail with an error if the objectname of the fullname is "sqlite_master" or "sqlite_temp_master" and the database connection is not in writeable schema mode.
H43821 When the form of an INSERT statement is simply "INSERT" then the default null- and uniqueness-conflict resolution algorithms shall be used.
H43824 When the form of an INSERT statement is simply "REPLACE" then the null- and uniqueness-conflict resolution algorithms shall all change to REPLACE.
H43827 When the form of an INSERT statement is "INSERT OR algorithm" then the null- and uniqueness-conflict resolution algorithms shall all change to algorithm.
H43831 Name resolution in the insert_content term of an INSERT statement shall be carried out using a name context with an empty result set and a source set holding single source element that is the fullname table.
H43840 The SQLite parser shall accept INSERT VALUE statements that conform to the following syntax:
insert_content ::= VALUES LP exprlist RP.
H43843 The preparation of an INSERT VALUE statement shall fail with an error if the columnlist element exists and the number of entries in the instcollist is different from the number of entries in the exprlist.
H43846 The preparation of an INSERT VALUE statement shall fail with an error if the columnlist element does not exists and the number of entries in the exprlist is different from the number of columns in the table or view identified by fullname.
H43890 The SQLite parser shall accept INSERT DEFAULT statements that conform to the following syntax:
insert_contents ::= DEFAULT VALUES.
H43900 The SQLite parser shall accept DELETE statements that conform to the following syntax:
cmd ::= DELETE FROM fullname where.
where ::= .
where ::= WHERE expr.
H43904 The preparation of a DELETE statement shall fail with an error if the fullname element does not identify a view with an INSTEAD OF DELETE trigger or a table.
H43907 The preparation of a DELETE statement shall fail with an error if the objectname of the fullname element is "sqlite_master" or "sqlite_temp_master" and the database connection is not in writeable_schema mode.
H43911 Name resolution in the where term of a DELETE statement shall be carried out using a name context with an empty result set and a source set holding single source element that is the fullname table.
H44100 The SQLite parser shall accept UPDATE statements that conform to the following syntax:
cmd ::= update_cmd fullname SET setlist where.
update_cmd ::= UPDATE.
update_cmd ::= UPDATE OR IGNORE.
update_cmd ::= UPDATE OR REPLACE.
update_cmd ::= UPDATE OR ABORT.
update_cmd ::= UPDATE OR FAIL.
update_cmd ::= UPDATE OR ROLLBACK.
setlist ::= setting.
setlist ::= setlist COMMA setting.
setting ::= columnname EQ expr.
H44113 The preparation of an UPDATE statement shall fail with an error if any columnname is not a column in the table identified by fullname and is not one of the special columns named "ROWID", "OID", or "_ROWID_".
H44116 The preparation of an UPDATE statement shall fail with an error if fullname does not identify either a view with an INSTEAD OF UPDATE trigger that covers all columnnames or a table.
H44119 The preparation of an UPDATE statement shall fail with an error if the objectname of the fullname is "sqlite_master" or "sqlite_temp_master" and the database connection is not in writeable schema mode.
H44121 When the form of an UPDATE statement is simply "UPDATE" then the default null- and uniqueness-conflict resolution algorithms shall be used.
H44127 When the form of an UPDATE statement is "UPDATE OR algorithm" then the null- and uniqueness-conflict resolution algorithms shall all change to algorithm.
H44131 Name resolution in the where term of a DELETE statement shall be carried out using a name context with an empty result set and a source set holding single source element that is the fullname table.
H44200 The SQLite parser shall accept VACUUM statements that conform to the following syntax:
cmd ::= VACUUM.
cmd ::= VACUUM name.
H44300 The SQLite parser shall accept ANALYZE statements that conform to the following syntax:
cmd ::= ANALYZE.
cmd ::= ANALYZE fullname.
H44303 The preparation of an ANALYZE statement shall fail with an error if the fullname is included and does not evaluate to either an individual table name or the name of a database.
H44400 The SQLite parser shall accept REINDEX statements that conform to the following syntax:
cmd ::= REINDEX.
cmd ::= REINDEX fullname.
H44403 The preparation of an ANALYZE statement shall fail with an error if the fullname is included and does not evaluate to either an individual table name or the name of a database or the name of a collating sequence.
H44500 cmd ::= ATTACH database_kw expr AS expr. database_kw ::= . database_kw ::= DATABASE.
H44503 The expr terms of an ATTACH statement that are identifiers shall be interpreted as string literals.
H44506 The preparation of an ATTACH statement shall fail with an error if either expr is not a constant expression.
H44509 The preparation of an ATTACH statement shall fail with an error if the second expr evaluates to the name of a database that is already attached to the database connection.
H44600 The SQLite parser shall accept DETACH statements that conform to the following syntax:
cmd ::= DETACH database_kw expr.
H44603 The expr term of an DETACH statement that is an identifier shall be interpreted as string literals.
H44606 The preparation of an DETACH statement shall fail with an error if the expr is not a constant expression.
H44609 The preparation of an DETACH statement shall fail with an error if the expr does not evaluate to the name of an attached database other than "temp" or "main".
H44700 The SQLite parser shall accept the EXPLAIN keyword as a prefix to other valid SQL statements, as shown by the following syntax:
sql_statement ::= EXPLAIN cmd SEMI.
H44800 The SQLite parser shall accept EXPLAIN QUERY PLAY as a prefix to other valid SQL statements, as shown by the following syntax:
sql_statement ::= EXPLAIN QUERY PLAN cmd SEMI.
H45000 The SQLite parser shall accept SELECT statements that conform to the following syntax:
cmd ::= select.
select ::= query.
select ::= select UNION query.
select ::= select UNION ALL query.
select ::= select EXCEPT query.
select ::= select INTERSECT query.
query ::= SELECT distinct resultset from where groupby having orderby limit.
distinct ::= .
distinct ::= DISTINCT.
groupby ::= .
groupby ::= GROUP BY exprlist.
having ::= .
having ::= HAVING expr.
orderby ::= .
orderby ::= ORDER BY exprlist.
limit ::=.
limit ::= LIMIT expr.
limit ::= LIMIT expr COMMA expr.
limit ::= LIMIT expr OFFSET expr.
resultset ::= result.
resultset ::= resultset COMMA result.
result ::= STAR.
result ::= tablename DOT STAR.
result ::= expr as.
from ::= .
from ::= FROM sourceset.
sourceset ::= source.
sourceset ::= sourceset joinop source.
source ::= fullname as on using.
source ::= LP select RP as on using.
as ::= .
as ::= AS name.
as ::= identifier.
on ::= .
on ::= ON expr.
using ::= .
using ::= USING LP columnlist RP.
joinop ::= COMMA.
joinop ::= JOIN.
joinop ::= JOIN_KW JOIN.
joinop ::= JOIN_KW JOIN_KW JOIN.
joinop ::= JOIN_KW JOIN_KW JOIN_KW JOIN.
H45003 The preparation of a statement containing a select shall fail with an error if the select contains two terms of the same compound query having a different number of columns in their result sets.
H45006 The preparation of a statement containing a select shall fail with an error if the select contains a compound query that has an ORDER BY, GROUP BY, HAVING, or LIMIT clause on any term of than the right-most.
H45009 The preparation of a statement containing a select shall fail with an error if the select contains a compound query with an ORDER BY or GROUP BY clause with a term that is not either a token-by-token duplicate of the result columns of one of the compound query terms, or the "AS" name of one of the compound query terms, or a compile-time integer between 1 and N where N is the number of columns in each compound query term.
H45012 The preparation of a statement containing a select shall fail with an error if the select contains a join with two or more of the following properties:
  1. The NATURAL keyword in the joinop
  2. An ON clause
  3. A USING clause
H45015 The preparation of a statement containing a select shall fail with an error if the select contains a joinop that uses the keywords RIGHT or FULL.
H45018 The preparation of a statement containing a select shall fail with an error if the select contains a joinop that uses either of the keywords OUTER or LEFT together with either INNER or CROSS.
H45021 The preparation of a statement containing a select shall fail with an error if the select contains a using that names columns that are not found in both the table to the immediate right of the join and in the result set of all tables to the left of the join.
H45024 The preparation of a statement containing a select shall fail with an error if the fullname of a source does not refer to an existing table or view.
H45027 The preparation of a statement containing a limit shall fail with an error if any expr within the limit does not evaluate to a compile-time integer.
H45103 Name resolution of a top-level SELECT statement shall use an empty name context.
H45106 Name context of a query term shall be constructed by adding a new inner name context layer to the name context of the construct containing the query term.
H45109 Name resolution of the resultset of a query shall use the name context of the query with an empty result set and the source set configured to the from clause of the query.
H45112 Name resolution of all child terms of a query other than resultset child shall use the name context of the query with the result set configured to be the resultset clause of the query and with the source set configured to be the from clause of the query.
H46000 The SQLite parser shall accept PRAGMA statements that conform to the following syntax:
cmd ::= PRAGMA fullname EQ DELETE.
cmd ::= PRAGMA fullname EQ ON.
cmd ::= PRAGMA fullname EQ name.
cmd ::= PRAGMA fullname EQ expr.
cmd ::= PRAGMA fullname LP name RP.
cmd ::= PRAGMA fullname LP expr RP.
cmd ::= PRAGMA fullname.
H46003 The evaluation of a PRAGMA statement with an unknown verb shall be a silent no-op.
H47000 The SQLite parser shall accept expressions that conform to the following syntax:
expr ::= BITNOT expr.
expr ::= CASE case_operand case_exprlist case_else END.
expr ::= CAST LP expr AS typetoken RP.
expr ::= EXISTS LP select RP.
expr ::= function_name LP STAR RP.
expr ::= function_name LP distinct exprlist RP.
expr ::= LP expr RP.
expr ::= LP select RP.
expr ::= MINUS expr.
expr ::= NOT expr.
expr ::= PLUS expr.
expr ::= RAISE LP IGNORE RP.
expr ::= RAISE LP ABORT COMMA name RP.
expr ::= RAISE LP FAIL COMMA name RP.
expr ::= RAISE LP ROLLBACK COMMA name RP.
expr ::= VARIABLE.
expr ::= expr AND expr.
expr ::= expr BITAND expr.
expr ::= expr BITOR expr.
expr ::= expr LSHIFT expr.
expr ::= expr RSHIFT expr.
expr ::= expr COLLATE ids.
expr ::= expr CONCAT expr.
expr ::= expr EQ expr.
expr ::= expr NE expr.
expr ::= expr IS NOT NULL.
expr ::= expr IS NULL.
expr ::= expr ISNULL
expr ::= expr NOTNULL.
expr ::= expr LT expr.
expr ::= expr GT expr.
expr ::= expr GE expr.
expr ::= expr LE expr.
expr ::= expr NOT NULL.
expr ::= expr OR expr.
expr ::= expr PLUS expr.
expr ::= expr MINUS expr.
expr ::= expr STAR expr.
expr ::= expr SLASH expr.
expr ::= expr REM expr.
expr ::= expr BETWEEN expr AND expr.
expr ::= expr NOT BETWEEN expr AND expr.
expr ::= expr IN LP exprlist RP.
expr ::= expr IN LP select RP.
expr ::= expr IN fullname.
expr ::= expr NOT IN LP exprlist RP.
expr ::= expr NOT IN LP select RP.
expr ::= expr NOT IN fullname.
expr ::= expr LIKE_KW expr escape.
expr ::= expr MATCH expr escape.
expr ::= expr NOT LIKE_KW expr escape.
expr ::= expr NOT MATCH expr escape.
expr ::= rtvalue.
expr ::= term.
term ::= CTIME_KW.
term ::= INTEGER.
term ::= FLOAT
term ::= BLOB.
term ::= NULL.
term ::= STRING.
exprlist ::= expr.
exprlist ::= exprlist COMMA expr.
case_else ::= ELSE expr.
case_else ::= .
case_exprlist ::= WHEN expr THEN expr.
case_exprlist ::= case_exprlist WHEN expr THEN expr.
case_operand ::= expr.
case_operand ::= .
function_name ::= ID.
escape ::= .
escape ::= ESCAPE expr.
H47003 The unary PLUS, unary MINUS, and BITNOT operators shall have precedence over the COLLATE operator.
H47006 The COLLATE operator shall have precedence over the CONCAT operator.
H47009 The CONCAT operator shall have precedence over the STAR, SLASH, and REM operators.
H47012 The STAR, SLASH, and REM operator shall have equal precedence.
H47015 The STAR, SLASH, and REM operators shall have precedence over the binary PLUS and binary MINUS operators.
H47018 The binary PLUS and binary MINUS operators shall have equal precedence.
H47021 The binary PLUS and binary MINUS operators shall have precedence over the BITAND, BITOR, LSHIFT, and RSHIFT operators.
H47024 The BITAND, BITOR, LSHIFT, and RSHIFT operators shall have equal precendence.
H47027 The BITAND, BITOR, LSHIFT, and RSHIFT operators shall have precedence over the ESCAPE operator.
H47029 The ESCAPE operator shall have precedence over the GT, LE, LT, and GE operators.
H47033 The GT, LE, LT, and GE operators shall have equal precedence.
H47036 The GT, LE, LT, and GE operators shall have precedence over the IS, MATCH, LIKE_KW, BETWEEN, IN, ISNULL, NOTNULL, NE, and EQ operators shall have equal precedence.
H47039 The IS, MATCH, LIKE_KW, BETWEEN, IN, ISNULL, NOTNULL, NE, and EQ operators shall have equal precedence.
H47042 The IS, MATCH, LIKE_KW, BETWEEN, IN, ISNULL, NOTNULL, NE, and EQ operators shall have precedence over the unary NOT operator.
H47045 The unary NOT operator shall have precedence over the AND operator.
H47048 The AND operator shall have precedence over the OR operator.
H47051 Operators of equal precedence shall group from right to left.
H49100 The SQLite parser shall accept names, fullnames, and identifiers that conform to the following syntax:
name ::= ID.
name ::= JOIN_KW.
name ::= STRING.
fullname ::= objectname.
fullname ::= databasename DOT objectname.
objectname ::= name.
databasename ::= name.
columnname ::= name.
identifier ::= ID.
identifier ::= STRING.
H49103 The SQLite parser shall accept rtvalue elements of an expr that conform to the following syntax:
rtvalue ::= databasename DOT tablename DOT columnname.
rtvalue ::= tablename DOT columnname.
rtvalue ::= ID.
rtvalue ::= JOIN_KW.

This page last modified 2008/07/22 18:15:32 UTC