Compile-time Options

sqlite.org

Tin mới

sqlite3_progress_handler()

For most purposes, SQLite can be built just fine using the default compilation options. However, if required, the compile-time options documented below can be used to omit SQLite features (resulting in a smaller compiled

prepared statements

SQLITE_OMIT_DECLTYPE. By omitting the (seldom-needed) ability to return the declared type of columns from the result set of query, prepared statements can be made to consume less memory.

sqlite3_initialize()

sqlite3_vfs_find()

SQLITE_RESULT_SUBTYPE

sqlite3_result_subtype()

date and time functions

SQLITE_CONFIG_MALLOC

database connections

This macro determines the initial setting for PRAGMA automatic_index for newly opened database connections. For all versions of SQLite through 3.7.17, automatic indices are normally enabled for new database connections i

descending indices

The default schema format number used by SQLite when creating new database files is set by this macro. The schema formats are all very similar. The difference between formats 1 and 4 is that format 4 understands descendi

SQLITE_DBCONFIG_LOOKASIDE

Sets the default size of the lookaside memory allocator memory pool to N entries of SZ bytes each. This setting can be modified at start-time using sqlite3_config(SQLITE_CONFIG_LOOKASIDE) and/or as each database connecti

sqlite3_memory_used()

This macro is used to determine whether or not the features enabled and disabled using the SQLITE_CONFIG_MEMSTATUS argument to sqlite3_config() are available by default. The default value is 1 (SQLITE_CONFIG_MEMSTATUS re

SQLITE_STATUS_MEMORY_USED

This macro is used to determine whether or not the features enabled and disabled using the SQLITE_CONFIG_MEMSTATUS argument to sqlite3_config() are available by default. The default value is 1 (SQLITE_CONFIG_MEMSTATUS re

https://sqlite.org/src/info/05f43be8fdda9f

This compile-time option causes the LIKE operator to always return False if either operand is a BLOB. The default behavior of LIKE is that BLOB operands are cast to TEXT before the comparison is done.

sqlite3_soft_heap_limit()

This option limits the total amount of memory that SQLite will request from malloc() to N bytes. Any attempt by SQLite to allocate new memory that would cause the sum of all allocations held by SQLite to exceed N bytes w

SQLITE_FCNTL_MMAP_SIZE

SQLITE_LIMIT_WORKER_THREADS

Set an upper bound on the sqlite3_limit(db,SQLITE_LIMIT_WORKER_THREADS,N) setting that determines the maximum number of auxiliary threads that a single prepared statement will use to aid with CPU-intensive computations (

sqlite3_deserialize()

Set the default size limit (in bytes) for in-memory databases created using sqlite3_deserialize(). This is just the default. The limit can be changed at start-time using sqlite3_config(SQLITE_CONFIG_MEMDB_MAXSIZE,N) or a

printf() SQL function

This option limits the maximum width and precision of substitutions for the printf() SQL function and the other C-language string formatting functions such as sqlite3_mprintf() and sqlite3_str_appendf(). This is turn can

sqlite3_str_appendf()

This option limits the maximum width and precision of substitutions for the printf() SQL function and the other C-language string formatting functions such as sqlite3_mprintf() and sqlite3_str_appendf(). This is turn can

sqlite3_malloc64()

This compile-time option sets an upper bound on the size of memory allocations that can be requested using sqlite3_malloc64(), sqlite3_realloc64(), and similar. The default value is 2,147,483,391 (0x7ffffeff) and this sh

operating system interface

This option is typically used when building SQLite for an embedded platform with a custom operating system.

sqlite3_threadsafe()

To put it another way, SQLITE_THREADSAFE=1 sets the default threading mode to Serialized. SQLITE_THREADSAFE=2 sets the default threading mode to Multi-threaded. And SQLITE_THREADSAFE=0 sets the threading mode to Single-t

SQLITE_OPEN_NOMUTEX

To put it another way, SQLITE_THREADSAFE=1 sets the default threading mode to Serialized. SQLITE_THREADSAFE=2 sets the default threading mode to Multi-threaded. And SQLITE_THREADSAFE=0 sets the threading mode to Single-t

sqlite3_io_methods

SQLITE_IOCAP_ATOMIC

sqlite3_file_control()

Future versions of SQLite might enable the batch-atomic-write capability by default, at which point this compile-time option will become superfluous.

sqlite3_column_database_name()

sqlite3_serialize()

This option was formerly used to enable the sqlite3_serialize() and sqlite3_deserialize() interfaces. However, as of SQLite 3.36.0 (2021-06-18) those interfaces are enabled by default and a new compile-time option SQLITE

built-in SQL math functions

This macro enables the built-in SQL math functions. This option is automatically added to the Makefile by the configure script on unix platforms, unless the --disable-math option is used. This option is also included on

sqlite3_release_memory()

This option adds extra logic to SQLite that allows it to release unused memory upon request. This option must be enabled in order for the sqlite3_release_memory() interface to work. If this compile-time option is not use

sqlite3_normalized_sql()

This option includes the sqlite3_normalized_sql() API.

sqlite3_blob_reopen()

This option enables an optimization that omits NULL columns at the ends of rows, for a space savings on disk.

sqlite3_db_config()

This option causes the query planner stability guarantee (QPSG) to be on by default. Normally the QPSG is off and must be activated at run-time using the SQLITE_DBCONFIG_ENABLE_QPSG option to the sqlite3_db_config() inte

sqlite3_snapshot_get()

sqlite3_snapshot_free()

sqlite3_snapshot_open()

sqlite3_snapshot_cmp()

sqlite3_snapshot_recover()

sqlite3_stmt_scanstatus()

This option enables the sqlite3_stmt_scanstatus() and sqlite3_stmt_scanstatus_v2() interfaces and activates the nexec and ncycle columns of the bytecode virtual table. These features are normally omitted or deactivated b

sqlite3_unlock_notify()

This option enables the sqlite3_unlock_notify() interface and its associated functionality. See the documentation titled Using the SQLite Unlock Notification Feature for additional information.

Using the SQLite Unlock Notification Feature

This option enables the sqlite3_unlock_notify() interface and its associated functionality. See the documentation titled Using the SQLite Unlock Notification Feature for additional information.

sqlite3_set_authorizer()

Defining this option causes the sqlite3_set_authorizer() API function and related logic to be omitted.

INTEGER PRIMARY KEY

This option is omits the AUTOINCREMENT feature. When this is macro is defined, columns declared as "INTEGER PRIMARY KEY AUTOINCREMENT" behave in the same way as columns declared as "INTEGER PRIMARY KEY" when a NULL is in

sqlite3_compileoption_used()

This option is used to omit the compile-time option diagnostics available in SQLite, including the sqlite3_compileoption_used() and sqlite3_compileoption_get() C/C++ functions, the sqlite_compileoption_used() and sqlite_

sqlite3_complete()

This option causes the sqlite3_complete() and sqlite3_complete16() interfaces to be omitted.

common table expressions

This option causes support for common table expressions to be omitted.

sqlite3_column_decltype()

This option causes SQLite to omit support for the sqlite3_column_decltype() and sqlite3_column_decltype16() interfaces.

sqlite3_aggregate_count()

sqlite3_result_double()

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