Lines Matching full:for
8 ** May you find forgiveness for yourself and forgive others.
24 ** The official C-language API documentation for SQLite is derived
35 #include <stdarg.h> /* Needed for the definition of va_list */
73 ** should not use deprecated interfaces - they are supported for backwards
101 ** format "X.Y.Z" where X is the major version number (always 3 for
106 ** The SQLITE_VERSION_NUMBER for any given release of SQLite will also
149 ** function is provided for use in DLLs since DLL users usually do not have
178 ** ^Support for the diagnostic functions sqlite3_compileoption_used()
206 ** the mutexes. But for maximum safety, mutexes should be enabled.
207 ** ^The default behavior is for mutexes to be enabled.
224 ** See the [threading mode] documentation for additional information.
249 ** SQLite includes typedefs for 64-bit signed and unsigned integers.
252 ** The sqlite_int64 and sqlite_uint64 types are supported for backwards
278 ** If compiling for a processor that lacks floating point support,
279 ** substitute integer for floating-point.
290 ** for the [sqlite3] object.
302 ** finished. The sqlite3_close_v2() interface is intended for use with
331 ** The type for a callback function.
332 ** This is legacy and deprecated. It is included for historical
350 ** sqlite3_exec() is not NULL, then it is invoked for each result row
376 ** [sqlite3_column_text()], one for each column. ^If an element of a
377 ** result row is NULL then the corresponding string pointer for the
462 ** support for additional result codes that provide more detailed information
465 ** [sqlite3_extended_result_codes()] API. Or, the extended code for
527 ** CAPI3REF: Flags For File Open Operations
529 ** These bit values are intended for use in the
533 #define SQLITE_OPEN_READONLY 0x00000001 /* Ok for sqlite3_open_v2() */
534 #define SQLITE_OPEN_READWRITE 0x00000002 /* Ok for sqlite3_open_v2() */
535 #define SQLITE_OPEN_CREATE 0x00000004 /* Ok for sqlite3_open_v2() */
539 #define SQLITE_OPEN_URI 0x00000040 /* Ok for sqlite3_open_v2() */
540 #define SQLITE_OPEN_MEMORY 0x00000080 /* Ok for sqlite3_open_v2() */
548 #define SQLITE_OPEN_NOMUTEX 0x00008000 /* Ok for sqlite3_open_v2() */
549 #define SQLITE_OPEN_FULLMUTEX 0x00010000 /* Ok for sqlite3_open_v2() */
550 #define SQLITE_OPEN_SHAREDCACHE 0x00020000 /* Ok for sqlite3_open_v2() */
551 #define SQLITE_OPEN_PRIVATECACHE 0x00040000 /* Ok for sqlite3_open_v2() */
632 ** only make a difference on Mac OSX for the default SQLite code.
649 ** for their own use. The pMethods entry is a pointer to an
650 ** [sqlite3_io_methods] object that defines methods for performing
655 const struct sqlite3_io_methods *pMethods; /* Methods for an open file */
671 ** is for the [sqlite3_vfs.xOpen] to set the sqlite3_file.pMethods element
699 ** write return values. Potential uses for xFileControl() might be
701 ** locking strategy (for example to use dot-file locks), to inquire
703 ** core reserves all opcodes less than 100 for its own use.
707 ** return [SQLITE_NOTFOUND] for file control opcodes that they do not
766 /* Methods above are valid for version 1 */
771 /* Methods above are valid for version 2 */
774 /* Methods above are valid for version 3 */
782 ** These integer constants are opcodes for the xFileControl method
783 ** of the [sqlite3_io_methods] object and for the [sqlite3_file_control()]
788 ** The [SQLITE_FCNTL_LOCKSTATE] opcode is used for debugging. This
809 ** for the nominated database. Allocating database file space in large
821 ** the [rollback journal] or the [write-ahead log]) for a particular database
851 ** retry counts and intervals for certain disk I/O operations for the
858 ** to be adjusted. The values are changed for all database connections
869 ** write ahead log and shared memory files used for transaction control
875 ** in order for the database to be readable. The fourth parameter to
876 ** [sqlite3_file_control()] for this opcode should be a pointer to an integer.
886 ** [sqlite3_file_control()] for this opcode should be a pointer to an integer.
893 ** a write transaction to indicate that, unless it is rolled back for some
903 ** The caller is responsible for freeing the memory when done. As with
907 ** is intended for diagnostic use only.
925 ** pragma or NULL if the pragma has no argument. ^The handler for an
959 ** temporary filenames for TEMP tables and other internal uses. The
966 ** maximum number of bytes that will be used for memory-mapped I/O.
995 ** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging. This
1009 ** VFS should return SQLITE_NOTFOUND for this opcode.
1013 ** the RBU extension only. All other VFS should return SQLITE_NOTFOUND for
1057 ** abstract type for a mutex object. The SQLite core never looks
1080 ** in the name of the object stands for "virtual file system". See
1081 ** the [VFS | VFS documentation] for further information.
1121 ** filename if it needs to remember the filename for some reason.
1123 ** must invent its own temporary name for the file. ^Whenever the
1149 ** change the way it deals with files. For example, an application
1166 ** will be set for TEMP databases and their journals, transient
1176 ** for exclusive access.
1190 ** to test for the existence of a file, or [SQLITE_ACCESS_READWRITE] to
1195 ** ^SQLite will always allocate at least mxPathname+1 bytes for the
1204 ** included in the VFS structure for completeness.
1208 ** The xSleep() method causes the calling thread to sleep for at
1210 ** method returns a Julian Day Number for the current date and time as
1227 ** next. Applications that use these interfaces must be prepared for any
1228 ** or all of these interfaces to be NULL or for their behavior to change
1261 ** Those below are for version 3 and greater.
1274 ** CAPI3REF: Flags for the xAccess VFS method
1278 ** what kind of permissions the xAccess method is looking for.
1298 ** CAPI3REF: Flags for the xShmLock VFS method
1368 ** ^If for some reason, sqlite3_initialize() is unable to initialize
1374 ** invoke sqlite3_initialize() directly. For example, [sqlite3_open()]
1380 ** prior to using any other SQLite interface. For maximum portability,
1400 ** implementations for sqlite3_os_init() and sqlite3_os_end()
1401 ** are built into SQLite when it is compiled for Unix, Windows, or OS/2.
1402 ** When [custom builds | built for other platforms]
1404 ** option) the application must supply a suitable implementation for
1420 ** the application. The default configuration is recommended for most
1480 ** memory allocation subsystem for SQLite to use for all of its
1484 ** that are perfectly adequate for the overwhelming majority of applications
1509 ** The xInit method initializes the memory allocator. For example,
1519 ** not need to be threadsafe either. For all other methods, SQLite
1524 ** methods must be threadsafe or else make their own arrangements for
1572 ** The application is responsible for serializing access to
1614 ** tracks memory usage, for example. </dd>
1634 ** that SQLite can use for scratch memory. ^(There are three arguments
1656 ** that SQLite can use for the database page cache with the default page
1664 ** (a power of two between 512 and 65536) plus some extra bytes for each
1668 ** for the sz parameter to be larger than necessary. The pMem
1677 ** does an initial bulk allocation for page cache memory
1678 ** from [sqlite3_malloc()] sufficient for N cache lines if N is positive or
1681 ** allocation, then SQLite goes to [sqlite3_malloc()] separately for each
1686 ** that SQLite will use for all of its dynamic memory allocation needs
1687 ** beyond those provided for by [SQLITE_CONFIG_SCRATCH] and
1703 ** for the minimum allocation size are 2**5 through 2**8.</dd>
1723 ** routines with a wrapper used to track mutex usage for performance
1724 ** profiling or testing, for example. ^If SQLite is compiled with
1788 ** the use of covering indices for full table scans in the query optimizer.
1792 ** The ability to disable the use of covering indices for full table scans
1801 ** They are retained for backwards compatibility but are now no-ops.
1824 ** that are the default mmap size limit (the default setting for
1838 ** compiled for Windows with the [SQLITE_WIN32_MALLOC] pre-processor macro
1846 ** bytes per page required for each page in [SQLITE_CONFIG_PAGECACHE].
1853 ** is an unsigned integer and sets the "Minimum PMA Size" for the multithreaded
1872 ** The default value for this setting is controlled by the
1919 ** [lookaside memory allocator] configuration for the [database connection].
1921 ** pointer to a memory buffer to use for lookaside memory.
1931 ** configuration for a database connection can only be changed when that
2039 ** codes are disabled by default for historical compatibility.
2047 ** ^Each entry in most SQLite tables (except for [WITHOUT ROWID] tables)
2053 ** is another alias for the rowid.
2090 ** ^For the purposes of this routine, an [INSERT] is considered to
2235 ** SQLite for parsing. ^These routines return 1 if the input string
2285 ** been invoked previously for the same locking event. ^If the
2304 ** SQLite returns [SQLITE_BUSY] for the first process, hoping that this
2310 ** ^(There can only be a single busy handler defined for each
2331 ** for a specified amount of time when a table is locked. ^The handler
2340 ** ^(There can only be a single busy handler for a particular
2350 ** CAPI3REF: Convenience Routines For Running Queries
2353 ** This is a legacy interface that is preserved for backwards compatibility.
2464 ** parameter "n" is the total size of the buffer, including space for
2471 ** options that are useful for constructing SQL statements.
2477 ** %q is designed for use inside a string literal.)^ By doubling each '\''
2481 ** For example, assume the string variable zText contains text as follows:
2515 ** single quotes).)^ So, for example, one could say:
2529 ** character.)^ The "%w" formatting option is intended for safely inserting
2544 ** The SQLite core uses these three routines for all of its own
2547 ** Windows VFS uses native malloc() and free() for some operations.
2639 ** SQLite provides these two interfaces for reporting on the status
2667 ** already uses the largest possible [ROWID]. The PRNG is also used for
2669 ** applications to access the same PRNG for other purposes.
2675 ** call had N less than one or a NULL pointer for P, then the PRNG is
2730 ** extracted from that table (for example in a query like
2732 ** is invoked once for that table with a column name that is an empty string.
2740 ** try to execute malicious statements that damage the database. For
2742 ** SQL queries for evaluation by a database. But the application does
2761 ** database connections for the meaning of "modify" in this paragraph.
2786 ** [sqlite3_set_authorizer | authorizer documentation] for additional
2810 ** is the name of the inner-most trigger or view that is responsible for
2857 ** These routines register callback functions that can be used for
2865 ** as each triggered subprogram is entered. The callbacks for triggers
2986 ** [sqlite3_exec()], [sqlite3_step()] and [sqlite3_get_table()] for
2987 ** database connection D. An example use for this
3009 ** database connections for the meaning of "modify" in this paragraph.
3019 ** filename argument. ^The filename argument is interpreted as UTF-8 for
3021 ** order for sqlite3_open16(). ^(A [database connection] handle is usually
3031 ** ^The default encoding will be UTF-8 for databases created using
3032 ** sqlite3_open() or sqlite3_open_v2(). ^The default encoding for databases
3040 ** except that it accepts two additional parameters for additional control
3053 ** <dd>The database is opened for reading and writing if possible, or reading
3058 ** <dd>The database is opened for reading and writing, and is created if
3059 ** it does not already exist. This is the behavior that is always used for
3086 ** is created for the connection. ^This in-memory database will vanish when
3107 ** interpretation by default. See "[URI filenames]" for additional
3142 ** ^If "ro" is specified, then the database is opened for read-only
3145 ** "rw", then the database is opened for read-write (but not create)
3150 ** or writes from disk is used. ^It is an error to specify a value for
3169 ** is useful for accessing a database on a filesystem that does not
3188 ** parameters. See "[query parameters with special meaning to SQLite]" for
3210 ** Open file "data.db" in the current directory for read-only access.
3217 ** An error. "readonly" is not a valid option for the "mode" parameter.
3229 ** <b>Note to Windows users:</b> The encoding used for the filename argument
3257 ** CAPI3REF: Obtain Values For URI Parameters
3306 ** returns the numeric [result code] or [extended result code] for that
3382 ** new limit for that construct.)^
3385 ** ^(For each limit category SQLITE_LIMIT_<i>NAME</i> there is a
3398 ** Run-time limits are intended for use in applications that manage
3401 ** web browser that has its own databases for storing history and
3445 ** the equivalent tries to allocate space for more than this many opcodes
3464 ** <dd>The maximum depth of recursion for triggers.</dd>)^
3496 ** that the prepared statement will be retained for a long time and
3516 ** are constructors for the [prepared statement] object.
3521 ** for special purposes.
3556 ** The calling procedure is responsible for deleting the compiled
3564 ** and sqlite3_prepare16_v3() interfaces are recommended for all new programs.
3566 ** are retained for backwards compatibility, but their use is discouraged.
3586 ** interfaces, the underlying reason for the error is returned immediately.
3591 ** WHERE clause might influence the choice of query plan for a statement,
3665 ** ^(For example, if a prepared statement is created using the SQL
3698 ** ^(For example, if an application defines a function "eval()" that
3717 ** ^The sqlite3_stmt_readonly() interface returns true for [BEGIN] since
3720 ** sqlite3_stmt_readonly() returns false for those commands.
3740 ** for example, in diagnostic routines to search for prepared
3751 ** for the values it stores. ^Values stored in sqlite3_value objects
3763 ** a mutex is held. An internal mutex is held for a protected
3764 ** sqlite3_value object but no mutex is held for an unprotected
3771 ** for maximum code portability it is recommended that applications
3831 ** ^The index for named parameters can be looked up using the
3833 ** for "?NNN" parameters is the value of NNN.
3881 ** Zeroblobs are intended to serve as placeholders for BLOBs whose
3884 ** ^A negative value for the zeroblob results in a zero-length BLOB.
3889 ** a pointer to a destructor function for P. ^SQLite will invoke the
3893 ** [pointer passing interface] added for SQLite 3.20.0.
3896 ** for the [prepared statement] or with a prepared statement for which
3939 ** placeholders for values that are [sqlite3_bind_blob | bound]
3943 ** parameter. For all forms except ?NNN, this will correspond to the
3986 ** index value returned is suitable for use as the second
4015 ** [prepared statement] returns no data (for example an [UPDATE]).
4039 ** reprepared by the first call to [sqlite3_step()] for a particular run
4044 ** (for example during a conversion from UTF-8 to UTF-16) then a
4047 ** ^The name of a result column is the value of the "AS" clause for
4068 ** reprepared by the first call to [sqlite3_step()] for a particular run
4078 ** ^The left-most column is column 0 for these routines.
4098 ** for the same [prepared statement] and result column
4120 ** ^(For example, given the database schema:
4128 ** this routine would return the string "VARIANT" for the second result
4129 ** column (i==1), and a NULL pointer for the first result column (i==0).)^
4156 ** new "vX" interface is recommended for new applications but the legacy
4177 ** is returned each time a new row of data is ready for processing by the
4184 ** ^With the legacy interface, a more specific error code (for example,
4197 ** For all versions of SQLite up to and including 3.6.23.1, a call to
4260 ** These constants are codes for each of those types.
4263 ** for a completely different meaning. Software that links against both
4309 ** and the second argument is the index of the column for which information
4328 ** the result column is not initially in the requested format (for example,
4333 ** [SQLITE_INTEGER | datatype code] for the initial data type
4339 ** automatic type conversions have occurred for the value in question.
4369 ** of the string. ^For clarity: the values returned by
4375 ** value from sqlite3_column_blob() for a zero-length BLOB is a NULL pointer.
4391 ** ^For example, if the internal representation is FLOAT and a text result
4505 ** resource leaks. It is a grievous error for the application to try to use
4525 ** ^If the most recent call to [sqlite3_step(S)] for the
4530 ** ^If the most recent call to [sqlite3_step(S)] for the
4549 ** these routines are the text encoding expected for
4551 ** and the presence or absence of a destructor callback for
4575 ** [SQLITE_UTF8 | text encoding] this SQL function prefers for
4582 ** different preferred text encodings, with different implementations for
4603 ** and xFinal and NULL pointer must be passed for xFunc. ^To delete an existing
4604 ** SQL function or aggregate, pass NULL pointers for all three function
4608 ** then it is destructor for the application data pointer.
4765 ** routine is part of the [pointer passing interface] added for SQLite 3.20.0.
4768 ** [SQLITE_INTEGER | datatype code] for the initial datatype of the
4771 ** Other interfaces might change the datatype for an sqlite3_value object.
4772 ** For example, if the datatype is initially SQLITE_INTEGER and
4773 ** sqlite3_value_text(V) is called to extract a text value for that
4813 ** The sqlite3_value_subtype(V) function returns the subtype for
4817 ** routine to set the subtype for the return value of an SQL function.
4843 ** routine to allocate memory for storing their state.
4846 ** for a particular aggregate function, SQLite
4849 ** sqlite3_aggregate_context() for the same aggregate function instance,
4851 ** called once for each invocation of the xStep callback and then one
4855 ** In those cases, sqlite3_aggregate_context() might be called for the
4884 ** CAPI3REF: User Data For Functions
4899 ** CAPI3REF: Database Connection For Functions
4927 ** value to the application-defined function. ^N is zero for the left-most
4932 ** ^The sqlite3_set_auxdata(C,N,P,X) interface saves P as metadata for the N-th
4942 ** <li> ^(when [sqlite3_reset()] or [sqlite3_finalize()] is called for the
4956 ** ^(In practice, metadata is preserved between function calls for
4974 ** These are special values for the destructor that is passed in as the
4996 ** for additional information.
5000 ** Refer to the [SQL parameter] documentation for additional information.
5106 ** for the P parameter. ^SQLite invokes D with P as its only argument
5109 ** routine is part of the [pointer passing interface] added for SQLite 3.20.0.
5161 ** for sqlite3_create_collation() and sqlite3_create_collation_v2()
5162 ** and a UTF-16 string in native byte order for sqlite3_create_collation16().
5176 ** ^The [SQLITE_UTF16] and [SQLITE_UTF16_ALIGNED] values for eTextRep
5178 ** ^The [SQLITE_UTF16_ALIGNED] value for eTextRep forces strings to begin
5201 ** The collating function must obey the following properties for all
5226 ** themselves rather than expecting SQLite to deal with it for them.
5296 ** Specify the key for an encrypted database. This routine should be
5331 ** Specify the activation key for a SEE database. Unless
5341 ** Specify the activation key for a CEROD database. Unless
5350 ** CAPI3REF: Suspend Execution For A Short Time
5353 ** for at least a number of milliseconds specified in its parameter.
5375 ** is a NULL pointer, then SQLite performs a search for an appropriate
5380 ** But for all other platforms, it is highly recommended that applications
5382 ** that exists for backwards compatibility of legacy applications and should
5436 ** for the process. Only the windows VFS makes use of this global
5464 ** CAPI3REF: Test For Auto-Commit Mode
5501 ** CAPI3REF: Return The Filename For A Database Connection
5550 ** for the same database connection is overridden.
5554 ** for the same database connection is overridden.
5561 ** on the same [database connection] D, or NULL for
5562 ** the first call for each function on D.
5572 ** the database connections for the meaning of "modify" in this paragraph.
5582 ** ^For the purposes of this API, a transaction is said to have been
5602 ** for the same database connection is overridden.
5632 ** database connections for the meaning of "modify" in this paragraph.
5636 ** on the same [database connection] D, or NULL for
5656 ** ^Cache sharing is enabled and disabled for an entire process.
5659 ** sharing was enabled or disabled for each thread separately.
5773 ** interface. This routine is provided for historical compatibility
5792 ** NULL pointer, then this routine simply checks for the existence of the
5802 ** for the table using the same algorithm used by the database engine to
5824 ** ^The memory pointed to by the character pointers returned for the
5833 ** parameters are set for the explicitly declared column. ^(If there is no
5835 ** for the [rowid] are set as follows:
5871 ** So for example, if "samplelib" cannot be loaded, then names like
5942 ** ^This interface causes the xEntryPoint() function to be invoked for
5944 ** xEntryPoint() is the entry point for a statically linked [SQLite extension]
5970 ** will be called more than once for each database connection that is opened.
6000 ** If this is a problem for you, do not use the interface at this time.
6020 ** This structure consists mostly of methods for the module.
6059 ** below are for version 2 and greater. */
6100 ** passed to sqlite3_declare_vtab(). For the first 63 columns (columns 0-62),
6149 ** structure for SQLite [version 3.8.2] ([dateof:3.8.2]).
6156 ** was added for [version 3.9.0] ([dateof:3.9.0]).
6165 int iColumn; /* Column constrained. -1 for ROWID */
6173 unsigned char desc; /* True for DESC. False for ASC. */
6178 unsigned char omit; /* Do not code a test for this constraint */
6201 ** These macros defined the allowed values for the
6223 ** preexisting [virtual table] for the module.
6234 ** is a pointer to a destructor for the pClientData. ^SQLite will
6245 const sqlite3_module *p, /* Methods for the module */
6246 void *pClientData /* Client data for xCreate/xConnect */
6251 const sqlite3_module *p, /* Methods for the module */
6252 void *pClientData, /* Client data for xCreate/xConnect */
6275 const sqlite3_module *pModule; /* The module for this virtual table */
6314 ** CAPI3REF: Overload A Function For A Virtual Table
6326 ** the new function is not good for anything by itself. Its only
6336 ** If this is a problem for you, do not use the interface at this time.
6357 ** CAPI3REF: Open A BLOB For Incremental I/O
6370 ** rather the symbolic name of the database. For attached databases, this is
6372 ** For the main database file, the database name is "main". For TEMP
6375 ** ^If the flags parameter is non-zero, then the BLOB is opened for read
6376 ** and write access. ^If the flags parameter is zero, the BLOB is opened for
6395 ** constraint and the blob is being opened for read/write access)^,
6398 ** being opened for read/write access)^.
6417 ** ^Calls to [sqlite3_blob_read()] and [sqlite3_blob_write()] for
6460 ** ^(The new row must meet the same criteria as for [sqlite3_blob_open()] -
6482 ** ^If the blob handle being closed was opened for read-write access, and if
6556 ** ^If the [BLOB handle] passed as the first argument was not opened for
6590 ** single default VFS that is appropriate for the host computer.
6611 ** the default. The choice for the new VFS is arbitrary.)^
6620 ** The SQLite core uses these routines for thread
6621 ** synchronization. Though they are intended for internal
6637 ** that does no real locking and is appropriate for use in
6639 ** SQLITE_MUTEX_W32 implementations are appropriate for use on Unix
6688 ** may add additional static mutexes. Static mutexes are for internal
6695 ** returns a different mutex on every call. ^For the static
6714 ** ^(Some systems (for example, Windows 95) do not support the operation
6745 ** implementation for specialized deployments or systems for which SQLite
6750 ** output variable when querying the system for the current mutex
6755 ** ^The xMutexInit routine is called by SQLite exactly once for each
6763 ** interface is invoked exactly once for each call to [sqlite3_shutdown()].
6794 ** allocation for a static mutex. ^However xMutexAlloc() may use SQLite
6795 ** memory allocation for a fast or recursive mutex.
6819 ** are intended for use inside assert() statements. The SQLite core
6822 ** provides implementations for these routines when it is compiled
6869 #define SQLITE_MUTEX_STATIC_APP1 8 /* For use by application */
6870 #define SQLITE_MUTEX_STATIC_APP2 9 /* For use by application */
6871 #define SQLITE_MUTEX_STATIC_APP3 10 /* For use by application */
6872 #define SQLITE_MUTEX_STATIC_VFS1 11 /* For use by built-in VFS */
6873 #define SQLITE_MUTEX_STATIC_VFS2 12 /* For use by extension VFS */
6874 #define SQLITE_MUTEX_STATIC_VFS3 13 /* For use by application VFS */
6877 ** CAPI3REF: Retrieve the mutex for a database connection
6893 ** xFileControl method for the [sqlite3_io_methods] object associated
6895 ** name of the database is "main" for the main database or "temp" for the
6896 ** TEMP database, or the name that appears after the AS keyword for
6905 ** ^The SQLITE_FCNTL_FILE_POINTER value for the op parameter causes
6927 ** state of SQLite and to inject faults into SQLite for testing
6931 ** This interface is not for use by applications. It exists solely
6932 ** for verifying the correct operation of the SQLite library. Depending
6949 ** without notice. These values are for testing purposes only.
6983 ** highwater marks. ^The first argument is an integer code for
6990 ** value. For those parameters
6993 ** value. For these latter parameters nothing is written into *pCurrent.)^
7133 ** CAPI3REF: Status Parameters for database connections
7190 ** memory used to store the schema for all databases associated
7228 ** <dd>This parameter returns zero for the current value if and only if
7257 ** statements. For example, if the number of table steps greatly exceeds
7265 ** is an integer code for a specific [SQLITE_STMTSTATUS counter]
7276 ** CAPI3REF: Status Parameters for prepared statements
7286 ** a table as part of a full table scan. Large numbers for this counter
7287 ** may indicate opportunities for performance improvement through
7306 ** used as a proxy for the total work done by the prepared statement.
7317 ** been run. A single "run" for the purposes of this counter is one
7347 ** See [sqlite3_pcache_methods2] for additional information.
7359 ** See [sqlite3_pcache_methods2] for additional information.
7375 ** SQLite is used for the page cache.
7380 ** determine exactly which parts of a database file are cached and for
7385 ** The built-in page cache is recommended for most uses.
7393 ** ^(The xInit() method is called once for each effective
7420 ** SQLite will typically create one cache instance for each open database file,
7432 ** false if it is used for an in-memory database. The cache implementation
7460 ** for each entry in the page cache.
7547 ** retained in the header file for backwards compatibility only.
7581 ** It is useful either for creating backups of databases or
7582 ** for copying in-memory databases to or from persistent files.
7587 ** for the duration of the backup operation.
7589 ** it is not locked continuously for the entire backup operation.
7603 ** There should be exactly one call to sqlite3_backup_finish() for each
7611 ** ^The database name is "main" for the main database, "temp" for the
7613 ** an [ATTACH] statement for an attached database.
7628 ** ^The error code and message for the failed call to sqlite3_backup_init()
7683 ** lasts for the duration of the sqlite3_backup_step() call.
7734 ** ^The source [database connection] may be used by the application for other
7781 ** [SQLite Shared-Cache Mode] for a description of shared-cache locking.
7798 ** the first argument to register for a callback that will be invoked
7840 ** more than one blocked connection that has registered for an unlock-notify
7850 ** Assuming that after registering for an unlock-notify callback a
7851 ** database waits for the callback to be issued before taking any further
7853 ** application to deadlock. For example, if connection X is waiting for
7862 ** a deadlocked state if connection A has registered for an unlock-notify
7864 ** B has itself registered for an unlock-notify callback when connection
7867 ** registered for an unlock-notify callback on the conclusion of connection
7913 ** [sqlite3_strglob(P,X)] is the same as for the "X GLOB P" operator in the
7930 ** [sqlite3_strlike(P,X,E)] is the same as for the "X LIKE P ESCAPE E"
7931 ** operator in the SQL dialect understood by SQLite. ^For "X LIKE P" without
7955 ** The sqlite3_log() interface is intended for use by extensions such as
8037 ** for a particular application.
8049 ** [write-ahead log] for database X on [database connection] D to be
8050 ** transferred into the database file and for the write-ahead log to
8051 ** be reset. See the [checkpointing] documentation for addition
8056 ** interface was added. This interface is retained for backwards
8057 ** compatibility and as a convenience for applications that need to manually
8074 ** ^Checkpoint as many frames as possible without waiting for any database
8123 ** is successfully obtained. ^The busy-handler is also invoked while waiting for
8125 ** the writer lock is obtained or while waiting for database readers, the
8167 ** These constants define all valid values for the "checkpoint mode" passed
8169 ** See the [sqlite3_wal_checkpoint_v2()] documentation for details on the
8173 #define SQLITE_CHECKPOINT_FULL 1 /* Wait for writers, then checkpoint */
8174 #define SQLITE_CHECKPOINT_RESTART 2 /* Like FULL but wait for for readers */
8238 ** of a [virtual table] implementation for an INSERT or UPDATE operation. ^The
8252 ** is for the SQL statement being evaluated.
8268 ** The following constants can be used for the T parameter to the
8270 ** different metric for sqlite3_stmt_scanstatus() to return.
8287 ** query planner's estimate for the average number of rows output from each
8290 ** product of this value for all prior loops with the same SELECTID will
8291 ** be the NLOOP value for the current loop.
8296 ** used for the X-th loop.
8301 ** description for the X-th loop.
8305 ** "select-id" for the X-th loop. The select-id identifies which query or
8323 ** performance for pStmt. Advanced applications can use this
8336 ** Parameter "idx" identifies the specific loop to retrieve statistics for.
8342 ** ^Statistics might not be available for all loops in all statements. ^In cases
8350 sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
8376 ** interface flushes caches for all schemas - "main", "temp", and
8388 ** ^If any other error occurs while flushing dirty pages to disk (for
8416 ** ^The preupdate hook only fires for changes to real database tables; the
8417 ** preupdate hook is not invoked for changes to [virtual tables] or to
8427 ** will be "main" for the main database or "temp" for TEMP tables or
8428 ** the name given after the AS keyword in the [ATTACH] statement for attached
8433 ** For an UPDATE or DELETE operation on a [rowid table], the sixth
8435 ** row being modified or deleted. For an INSERT operation on a rowid table,
8437 ** parameter is undefined. For an INSERT or UPDATE on a rowid table the
8440 ** function is not defined for operations on WITHOUT ROWID tables, or for
8475 ** operation; or 1 for inserts, updates, or deletes invoked by top-level
8476 ** triggers; or 2 for changes resulting from triggers called by top-level
8491 sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */
8506 ** The return value is OS-dependent. For example, on unix systems, after
8519 ** database for some specific point in history.
8525 ** as it existed for the point in time when the transaction first started.
8534 ** The constructor for this object is [sqlite3_snapshot_get()]. The
8536 ** to an historical snapshot (if possible). The destructor for
8555 ** The following must be true for this function to succeed. If any of
8576 ** database handle in autocommit mode but fails for some other reason,
8597 ** read transaction for schema S of
8608 ** a transaction for [sqlite3_snapshot_open(D,S,P)] to work, but the
8613 ** database connection D does not know that the database file for
8679 ** even though the wal file may contain other valid snapshots for which
8693 ** Undo the hack that converts floating point types to integer for
8713 ** May you find forgiveness for yourself and forgive others.
8800 sqlite3_int64 iRowid; /* Rowid for current entry */
8810 ** Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin.
8866 ** is not possible for an application to register a pre-update hook on a
8868 ** it possible to create a session object attached to a database handle for
8872 ** The session object will be used to create changesets for tables in
8892 ** are attached is closed. Refer to the documentation for
8893 ** [sqlite3session_create()] for details.
8904 ** Refer to the documentation for [sqlite3session_changeset()] for further
8932 ** for an indirect change above, or direct otherwise.
8939 ** indirect flag for the specified session object.
8952 ** documentation for [sqlite3session_changeset()] for further details.
8954 ** Or, if argument zTab is NULL, then changes are recorded for all tables
8956 ** executing "CREATE TABLE" statements) after this call is made, changes for
8959 ** Changes can only be recorded for tables that have a PRIMARY KEY explicitly
8968 ** Changes are not recorded for individual rows that have NULL values stored
8982 ** The second argument (xFilter) is the "filter callback". For changes to rows
9012 ** database row along with the updated values for each updated non-primary-key
9013 ** column. It is not possible for an UPDATE change to represent a change that
9017 ** Changes are not recorded for rows that have NULL values stored in one or
9049 ** deleted or updated rows. For each unique primary key value, data is only
9068 ** <li> For each record generated by an insert, the database is queried
9069 ** for a row with a matching primary key. If one is found, an INSERT
9073 ** <li> For each record generated by an update or delete, the database is
9074 ** queried for a row with a matching primary key. If such a row is
9093 ** is written to more than once during a session. For example, if a row
9138 ** <li> For each row (primary key) that exists in the to-table but not in
9141 ** <li> For each row (primary key) that exists in the to-table but not in
9144 ** <li> For each row (primary key) that exists in both tables, but features
9184 ** sqlite3changeset_xxx API functions except for sqlite3changeset_invert(),
9192 ** in the same way as for changesets.
9194 ** Changes within a patchset are ordered in the same way as for changesets
9195 ** generated by the sqlite3session_changeset() function (i.e. all changes for
9252 ** the applies to table X, then one for table Y, and then later on visit
9253 ** another change for table X.
9302 ** is an indirect change, or false (0) otherwise. See the documentation for
9303 ** [sqlite3session_indirect()] for a description of direct and indirect
9317 int *pbIndirect /* OUT: True for an 'indirect' change */
9323 ** For each modified table, a changeset includes the following:
9347 unsigned char **pabPK, /* OUT: Array of boolean - true for PK cols */
9400 ** a new value for the requested column, *ppValue is set to NULL and
9470 ** function (for example an [SQLITE_CORRUPT] in [sqlite3changeset_next()] or an
9496 ** <li> For each UPDATE change, the old.* and new.* values are exchanged.
9541 ** Refer to the sqlite3_changegroup documentation below for details.
9572 ** The usual usage pattern for an sqlite3_changegroup object is as follows:
9661 ** primary key columns for the table must be consistent. If this is not the
9683 ** in the same order as for the very first changeset added to the changegroup.
9685 ** changes for tables that do not appear in the first changeset, they are
9715 ** callback". If it is not NULL, then for each table affected by at least one
9724 ** For each table that is not excluded by the filter callback, this function
9740 ** one such warning is issued for each table in the changeset.
9742 ** For each change for which there is a compatible table, an attempt is made
9746 ** invoked. A description of exactly when the conflict handler is invoked for
9762 ** the documentation for the three
9763 ** [SQLITE_CHANGESET_OMIT|available return values] for details.
9767 ** For each DELETE change, this function checks if the target database
9794 ** For each INSERT change, an attempt is made to insert the new row into
9812 ** For each UPDATE change, this function checks if the target database
9822 ** UPDATE changes only contain values for non-primary key fields that are
10053 void *pIn, /* First arg for xInput */
10122 ** May you find forgiveness for yourself and forgive others.
10157 sqlite3_context *pCtx, /* Context for returning result/error */
10229 ** Query for the details of phrase match iIdx within the current row.
10253 ** This API function is used to query the FTS table for phrase iPhrase
10260 ** phrase iPhrase of the current query is included in $p. For each
10284 ** Each extension function is allocated a single auxiliary data slot for
10286 ** more than once for a single FTS query, then all invocations share a
10305 ** Returns the current auxiliary data pointer for the fts5 extension
10306 ** function. See the xSetAuxdata() method for details.
10330 ** for(pApi->xPhraseFirst(pFts, iPhrase, &iter, &iCol, &iOff);
10356 ** that contain one or more instances of a specified phrase. For example:
10360 ** for(pApi->xPhraseFirstColumn(pFts, iPhrase, &iter, &iCol);
10454 ** be invoked exactly once for each successful call to xCreate().
10486 ** For each token in the input string, the supplied callback xToken() must
10496 ** synonyms. In this case see the discussion below for details.
10498 ** FTS5 assumes the xToken() callback is invoked for each token in the
10512 ** user wishes to query for a phrase such as "first place". Using the
10523 ** same token for inputs "first" and "1st". Say that token is in
10525 ** 1st place" entries are added to the index for tokens "i", "won",
10526 ** "first" and "place". If the user then queries for '1st + place',
10527 ** the tokenizer substitutes "first" for "1st" and the query works
10530 ** <li> By adding multiple synonyms for a single term to the FTS index.
10532 ** provide multiple synonyms for a single term within the document.
10533 ** FTS5 then queries the index for each synonym individually. For
10539 ** the tokenizer offers both "1st" and "first" as synonyms for the
10546 ** except that, for the purposes of auxiliary functions, the query
10550 ** <li> By adding multiple synonyms for a single term to the FTS index.
10552 ** provides multiple synonyms for each token. So that when a
10554 ** added to the FTS index for "i", "won", "first", "1st" and
10559 ** inefficient), it doesn't matter if the user queries for
10566 ** is considered to supply a synonym for the previous token. For example,
10579 ** xToken() is called. Multiple synonyms may be specified for a single token
10581 ** There is no limit to the number of synonyms that may be provided for a
10585 ** extra data to the FTS index or require FTS5 to query for multiple terms,
10588 ** token "first" is subsituted for "1st" by the tokenizer, then the query:
10596 ** For full prefix support, method (3) may be preferred. In this case,
10597 ** because the index contains entries for both "first" and "1st", prefix
10605 ** provide synonyms for prefixes). However, a non-prefix query like '1st'
10609 ** as separate queries of the FTS index are required for each synonym.