.. Automatically generated by code2rst.py Edit src/apsw.c not this file! .. module:: apsw :synopsis: Python access to SQLite database library APSW Module *********** The module is the main interface to SQLite. Methods and data on the module have process wide effects. Type Annotations ================ Comprehensive `type annotations `__ are included, and your code using apsw can be checked using tools like `mypy `__. You can refer to the types below for your annotations (eg as :class:`apsw.SQLiteValue`) .. include:: ../doc/typing.rstgen API Reference ============= .. attribute:: SQLITE_VERSION_NUMBER :type: int The integer version number of SQLite that APSW was compiled against. For example SQLite 3.6.4 will have the value *3006004*. This number may be different than the actual library in use if the library is shared and has been updated. Call :meth:`sqlitelibversion` to get the actual library version. .. method:: apswversion() -> str Returns the APSW version. .. index:: sqlite3_compileoption_get .. attribute:: compile_options :type: Tuple[str, ...] A tuple of the options used to compile SQLite. For example it will be something like this:: ('ENABLE_LOCKING_STYLE=0', 'TEMP_STORE=1', 'THREADSAFE=1') Calls: `sqlite3_compileoption_get `__ .. index:: sqlite3_complete .. method:: complete(statement: str) -> bool Returns True if the input string comprises one or more complete SQL statements by looking for an unquoted trailing semi-colon. An example use would be if you were prompting the user for SQL statements and needed to know if you had a whole statement, or needed to ask for another line:: statement = input("SQL> ") while not apsw.complete(statement): more = input(" .. ") statement = statement + "\\n" + more Calls: `sqlite3_complete `__ .. index:: sqlite3_config .. method:: config(op: int, *args: Any) -> None :param op: A `configuration operation `_ :param args: Zero or more arguments as appropriate for *op* Many operations don't make sense from a Python program. The following configuration operations are supported: SQLITE_CONFIG_LOG, SQLITE_CONFIG_SINGLETHREAD, SQLITE_CONFIG_MULTITHREAD, SQLITE_CONFIG_SERIALIZED, SQLITE_CONFIG_URI, SQLITE_CONFIG_MEMSTATUS, SQLITE_CONFIG_COVERING_INDEX_SCAN, SQLITE_CONFIG_PCACHE_HDRSZ, SQLITE_CONFIG_PMASZ, and SQLITE_CONFIG_STMTJRNL_SPILL. See :ref:`tips ` for an example of how to receive log messages (SQLITE_CONFIG_LOG) Calls: `sqlite3_config `__ .. attribute:: connection_hooks :type: List[Callable[[Connection], None]] The purpose of the hooks is to allow the easy registration of :meth:`functions `, :ref:`virtual tables ` or similar items with each :class:`Connection` as it is created. The default value is an empty list. Whenever a Connection is created, each item in apsw.connection_hooks is invoked with a single parameter being the new Connection object. If the hook raises an exception then the creation of the Connection fails. If you wanted to store your own defined functions in the database then you could define a hook that looked in the relevant tables, got the Python text and turned it into the functions. .. index:: sqlite3_enable_shared_cache .. method:: enablesharedcache(enable: bool) -> None If you use the same :class:`Connection` across threads or use multiple :class:`connections ` accessing the same file, then SQLite can `share the cache between them `_. It is :ref:`not recommended ` that you use this. Calls: `sqlite3_enable_shared_cache `__ .. method:: exceptionfor(code: int) -> Exception If you would like to raise an exception that corresponds to a particular SQLite `error code `_ then call this function. It also understands `extended error codes `_. For example to raise `SQLITE_IOERR_ACCESS `_:: raise apsw.exceptionfor(apsw.SQLITE_IOERR_ACCESS) .. method:: fork_checker() -> None **Note** This method is not available on Windows as it does not support the fork system call. SQLite does not allow the use of database connections across `forked `__ processes (see the `SQLite FAQ Q6 `__). (Forking creates a child process that is a duplicate of the parent including the state of all data structures in the program. If you do this to SQLite then parent and child would both consider themselves owners of open databases and silently corrupt each other's work and interfere with each other's locks.) One example of how you may end up using fork is if you use the `multiprocessing module `__ which uses fork to make child processes. If you do use fork or multiprocessing on a platform that supports fork then you **must** ensure database connections and their objects (cursors, backup, blobs etc) are not used in the parent process, or are all closed before calling fork or starting a `Process `__. (Note you must call close to ensure the underlying SQLite objects are closed. It is also a good idea to call `gc.collect(2) `__ to ensure anything you may have missed is also deallocated.) Once you run this method, extra checking code is inserted into SQLite's mutex operations (at a very small performance penalty) that verifies objects are not used across processes. You will get a :exc:`ForkingViolationError` if you do so. Note that due to the way Python's internals work, the exception will be delivered to `sys.excepthook` in addition to the normal exception mechanisms and may be reported by Python after the line where the issue actually arose. (Destructors of objects you didn't close also run between lines.) You should only call this method as the first line after importing APSW, as it has to shutdown and re-initialize SQLite. If you have any SQLite objects already allocated when calling the method then the program will later crash. The recommended use is to use the fork checking as part of your test suite. .. method:: format_sql_value(value: SQLiteValue) -> str Returns a Python string representing the supplied value in SQL syntax. .. index:: sqlite3_initialize .. method:: initialize() -> None It is unlikely you will want to call this method as SQLite automatically initializes. Calls: `sqlite3_initialize `__ .. index:: sqlite3_keyword_count, sqlite3_keyword_name .. attribute:: keywords :type: Set[str] A set containing every SQLite keyword Calls: * `sqlite3_keyword_count `__ * `sqlite3_keyword_name `__ .. index:: sqlite3_log .. method:: log(errorcode: int, message: str) -> None Calls the SQLite logging interface. Note that you must format the message before passing it to this method:: apsw.log(apsw.SQLITE_NOMEM, f"Need { needed } bytes of memory") See :ref:`tips ` for an example of how to receive log messages. Calls: `sqlite3_log `__ .. index:: sqlite3_memory_highwater .. method:: memoryhighwater(reset: bool = False) -> int Returns the maximum amount of memory SQLite has used. If *reset* is True then the high water mark is reset to the current value. .. seealso:: :meth:`status` Calls: `sqlite3_memory_highwater `__ .. index:: sqlite3_memory_used .. method:: memoryused() -> int Returns the amount of memory SQLite is currently using. .. seealso:: :meth:`status` Calls: `sqlite3_memory_used `__ .. index:: sqlite3_randomness .. method:: randomness(amount: int) -> bytes Gets random data from SQLite's random number generator. :param amount: How many bytes to return Calls: `sqlite3_randomness `__ .. index:: sqlite3_release_memory .. method:: releasememory(amount: int) -> int Requests SQLite try to free *amount* bytes of memory. Returns how many bytes were freed. Calls: `sqlite3_release_memory `__ .. index:: sqlite3_shutdown .. method:: shutdown() -> None It is unlikely you will want to call this method and there is no need to do so. It is a **really** bad idea to call it unless you are absolutely sure all :class:`connections `, :class:`blobs `, :class:`cursors `, :class:`vfs ` etc have been closed, deleted and garbage collected. Calls: `sqlite3_shutdown `__ .. index:: sqlite3_soft_heap_limit64 .. method:: softheaplimit(limit: int) -> int Requests SQLite try to keep memory usage below *amount* bytes and returns the previous limit. Calls: `sqlite3_soft_heap_limit64 `__ .. index:: sqlite3_sourceid .. method:: sqlite3_sourceid() -> str Returns the exact checkin information for the SQLite 3 source being used. Calls: `sqlite3_sourceid `__ .. index:: sqlite3_libversion .. method:: sqlitelibversion() -> str Returns the version of the SQLite library. This value is queried at run time from the library so if you use shared libraries it will be the version in the shared library. Calls: `sqlite3_libversion `__ .. index:: sqlite3_status64 .. method:: status(op: int, reset: bool = False) -> Tuple[int, int] Returns current and highwater measurements. :param op: A `status parameter `_ :param reset: If *True* then the highwater is set to the current value :returns: A tuple of current value and highwater value .. seealso:: * :ref:`Status example ` Calls: `sqlite3_status64 `__ .. attribute:: using_amalgamation :type: bool If True then `SQLite amalgamation `__ is in use (statically compiled into APSW). Using the amalgamation means that SQLite shared libraries are not used and will not affect your code. .. method:: vfsnames() -> List[str] Returns a list of the currently installed :ref:`vfs `. The first item in the list is the default vfs. .. _sqliteconstants: SQLite constants ================ SQLite has `many constants `_ used in various interfaces. To use a constant such as *SQLITE_OK*, just use ``apsw.SQLITE_OK``. The same values can be used in different contexts. For example *SQLITE_OK* and *SQLITE_CREATE_INDEX* both have a value of zero. For each group of constants there is also a mapping (dict) available that you can supply a string to and get the corresponding numeric value, or supply a numeric value and get the corresponding string. These can help improve diagnostics/logging, calling other modules etc. For example:: apsw.mapping_authorizer_function["SQLITE_READ"] == 20 apsw.mapping_authorizer_function[20] == "SQLITE_READ" .. data:: mapping_access :type: typing.Dict[typing.Union[str, int], typing.Union[int, str]] `Flags for the xAccess VFS method `__ constants `SQLITE_ACCESS_EXISTS `__, `SQLITE_ACCESS_READ `__, `SQLITE_ACCESS_READWRITE `__ .. data:: mapping_authorizer_function :type: typing.Dict[typing.Union[str, int], typing.Union[int, str]] `Authorizer Action Codes `__ constants `SQLITE_ALTER_TABLE `__, `SQLITE_ANALYZE `__, `SQLITE_ATTACH `__, `SQLITE_COPY `__, `SQLITE_CREATE_INDEX `__, `SQLITE_CREATE_TABLE `__, `SQLITE_CREATE_TEMP_INDEX `__, `SQLITE_CREATE_TEMP_TABLE `__, `SQLITE_CREATE_TEMP_TRIGGER `__, `SQLITE_CREATE_TEMP_VIEW `__, `SQLITE_CREATE_TRIGGER `__, `SQLITE_CREATE_VIEW `__, `SQLITE_CREATE_VTABLE `__, `SQLITE_DELETE `__, `SQLITE_DETACH `__, `SQLITE_DROP_INDEX `__, `SQLITE_DROP_TABLE `__, `SQLITE_DROP_TEMP_INDEX `__, `SQLITE_DROP_TEMP_TABLE `__, `SQLITE_DROP_TEMP_TRIGGER `__, `SQLITE_DROP_TEMP_VIEW `__, `SQLITE_DROP_TRIGGER `__, `SQLITE_DROP_VIEW `__, `SQLITE_DROP_VTABLE `__, `SQLITE_FUNCTION `__, `SQLITE_INSERT `__, `SQLITE_PRAGMA `__, `SQLITE_READ `__, `SQLITE_RECURSIVE `__, `SQLITE_REINDEX `__, `SQLITE_SAVEPOINT `__, `SQLITE_SELECT `__, `SQLITE_TRANSACTION `__, `SQLITE_UPDATE `__ .. data:: mapping_authorizer_return :type: typing.Dict[typing.Union[str, int], typing.Union[int, str]] `Authorizer Return Codes `__ constants `SQLITE_DENY `__, `SQLITE_IGNORE `__, `SQLITE_OK `__ .. data:: mapping_bestindex_constraints :type: typing.Dict[typing.Union[str, int], typing.Union[int, str]] `Virtual Table Constraint Operator Codes `__ constants `SQLITE_INDEX_CONSTRAINT_EQ `__, `SQLITE_INDEX_CONSTRAINT_FUNCTION `__, `SQLITE_INDEX_CONSTRAINT_GE `__, `SQLITE_INDEX_CONSTRAINT_GLOB `__, `SQLITE_INDEX_CONSTRAINT_GT `__, `SQLITE_INDEX_CONSTRAINT_IS `__, `SQLITE_INDEX_CONSTRAINT_ISNOT `__, `SQLITE_INDEX_CONSTRAINT_ISNOTNULL `__, `SQLITE_INDEX_CONSTRAINT_ISNULL `__, `SQLITE_INDEX_CONSTRAINT_LE `__, `SQLITE_INDEX_CONSTRAINT_LIKE `__, `SQLITE_INDEX_CONSTRAINT_LIMIT `__, `SQLITE_INDEX_CONSTRAINT_LT `__, `SQLITE_INDEX_CONSTRAINT_MATCH `__, `SQLITE_INDEX_CONSTRAINT_NE `__, `SQLITE_INDEX_CONSTRAINT_OFFSET `__, `SQLITE_INDEX_CONSTRAINT_REGEXP `__ .. data:: mapping_config :type: typing.Dict[typing.Union[str, int], typing.Union[int, str]] `Configuration Options `__ constants `SQLITE_CONFIG_COVERING_INDEX_SCAN `__, `SQLITE_CONFIG_GETMALLOC `__, `SQLITE_CONFIG_GETMUTEX `__, `SQLITE_CONFIG_GETPCACHE `__, `SQLITE_CONFIG_GETPCACHE2 `__, `SQLITE_CONFIG_HEAP `__, `SQLITE_CONFIG_LOG `__, `SQLITE_CONFIG_LOOKASIDE `__, `SQLITE_CONFIG_MALLOC `__, `SQLITE_CONFIG_MEMDB_MAXSIZE `__, `SQLITE_CONFIG_MEMSTATUS `__, `SQLITE_CONFIG_MMAP_SIZE `__, `SQLITE_CONFIG_MULTITHREAD `__, `SQLITE_CONFIG_MUTEX `__, `SQLITE_CONFIG_PAGECACHE `__, `SQLITE_CONFIG_PCACHE `__, `SQLITE_CONFIG_PCACHE2 `__, `SQLITE_CONFIG_PCACHE_HDRSZ `__, `SQLITE_CONFIG_PMASZ `__, `SQLITE_CONFIG_SCRATCH `__, `SQLITE_CONFIG_SERIALIZED `__, `SQLITE_CONFIG_SINGLETHREAD `__, `SQLITE_CONFIG_SMALL_MALLOC `__, `SQLITE_CONFIG_SORTERREF_SIZE `__, `SQLITE_CONFIG_SQLLOG `__, `SQLITE_CONFIG_STMTJRNL_SPILL `__, `SQLITE_CONFIG_URI `__, `SQLITE_CONFIG_WIN32_HEAPSIZE `__ .. data:: mapping_conflict_resolution_modes :type: typing.Dict[typing.Union[str, int], typing.Union[int, str]] `Conflict resolution modes `__ constants `SQLITE_ABORT `__, `SQLITE_FAIL `__, `SQLITE_IGNORE `__, `SQLITE_REPLACE `__, `SQLITE_ROLLBACK `__ .. data:: mapping_db_config :type: typing.Dict[typing.Union[str, int], typing.Union[int, str]] `Database Connection Configuration Options `__ constants `SQLITE_DBCONFIG_DEFENSIVE `__, `SQLITE_DBCONFIG_DQS_DDL `__, `SQLITE_DBCONFIG_DQS_DML `__, `SQLITE_DBCONFIG_ENABLE_FKEY `__, `SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER `__, `SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION `__, `SQLITE_DBCONFIG_ENABLE_QPSG `__, `SQLITE_DBCONFIG_ENABLE_TRIGGER `__, `SQLITE_DBCONFIG_ENABLE_VIEW `__, `SQLITE_DBCONFIG_LEGACY_ALTER_TABLE `__, `SQLITE_DBCONFIG_LEGACY_FILE_FORMAT `__, `SQLITE_DBCONFIG_LOOKASIDE `__, `SQLITE_DBCONFIG_MAINDBNAME `__, `SQLITE_DBCONFIG_MAX `__, `SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE `__, `SQLITE_DBCONFIG_RESET_DATABASE `__, `SQLITE_DBCONFIG_TRIGGER_EQP `__, `SQLITE_DBCONFIG_TRUSTED_SCHEMA `__, `SQLITE_DBCONFIG_WRITABLE_SCHEMA `__ .. data:: mapping_db_status :type: typing.Dict[typing.Union[str, int], typing.Union[int, str]] `Status Parameters for database connections `__ constants `SQLITE_DBSTATUS_CACHE_HIT `__, `SQLITE_DBSTATUS_CACHE_MISS `__, `SQLITE_DBSTATUS_CACHE_SPILL `__, `SQLITE_DBSTATUS_CACHE_USED `__, `SQLITE_DBSTATUS_CACHE_USED_SHARED `__, `SQLITE_DBSTATUS_CACHE_WRITE `__, `SQLITE_DBSTATUS_DEFERRED_FKS `__, `SQLITE_DBSTATUS_LOOKASIDE_HIT `__, `SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL `__, `SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE `__, `SQLITE_DBSTATUS_LOOKASIDE_USED `__, `SQLITE_DBSTATUS_MAX `__, `SQLITE_DBSTATUS_SCHEMA_USED `__, `SQLITE_DBSTATUS_STMT_USED `__ .. data:: mapping_device_characteristics :type: typing.Dict[typing.Union[str, int], typing.Union[int, str]] `Device Characteristics `__ constants `SQLITE_IOCAP_ATOMIC `__, `SQLITE_IOCAP_ATOMIC16K `__, `SQLITE_IOCAP_ATOMIC1K `__, `SQLITE_IOCAP_ATOMIC2K `__, `SQLITE_IOCAP_ATOMIC32K `__, `SQLITE_IOCAP_ATOMIC4K `__, `SQLITE_IOCAP_ATOMIC512 `__, `SQLITE_IOCAP_ATOMIC64K `__, `SQLITE_IOCAP_ATOMIC8K `__, `SQLITE_IOCAP_BATCH_ATOMIC `__, `SQLITE_IOCAP_IMMUTABLE `__, `SQLITE_IOCAP_POWERSAFE_OVERWRITE `__, `SQLITE_IOCAP_SAFE_APPEND `__, `SQLITE_IOCAP_SEQUENTIAL `__, `SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN `__ .. data:: mapping_extended_result_codes :type: typing.Dict[typing.Union[str, int], typing.Union[int, str]] `Extended Result Codes `__ constants `SQLITE_ABORT_ROLLBACK `__, `SQLITE_AUTH_USER `__, `SQLITE_BUSY_RECOVERY `__, `SQLITE_BUSY_SNAPSHOT `__, `SQLITE_BUSY_TIMEOUT `__, `SQLITE_CANTOPEN_CONVPATH `__, `SQLITE_CANTOPEN_DIRTYWAL `__, `SQLITE_CANTOPEN_FULLPATH `__, `SQLITE_CANTOPEN_ISDIR `__, `SQLITE_CANTOPEN_NOTEMPDIR `__, `SQLITE_CANTOPEN_SYMLINK `__, `SQLITE_CONSTRAINT_CHECK `__, `SQLITE_CONSTRAINT_COMMITHOOK `__, `SQLITE_CONSTRAINT_DATATYPE `__, `SQLITE_CONSTRAINT_FOREIGNKEY `__, `SQLITE_CONSTRAINT_FUNCTION `__, `SQLITE_CONSTRAINT_NOTNULL `__, `SQLITE_CONSTRAINT_PINNED `__, `SQLITE_CONSTRAINT_PRIMARYKEY `__, `SQLITE_CONSTRAINT_ROWID `__, `SQLITE_CONSTRAINT_TRIGGER `__, `SQLITE_CONSTRAINT_UNIQUE `__, `SQLITE_CONSTRAINT_VTAB `__, `SQLITE_CORRUPT_INDEX `__, `SQLITE_CORRUPT_SEQUENCE `__, `SQLITE_CORRUPT_VTAB `__, `SQLITE_ERROR_MISSING_COLLSEQ `__, `SQLITE_ERROR_RETRY `__, `SQLITE_ERROR_SNAPSHOT `__, `SQLITE_IOERR_ACCESS `__, `SQLITE_IOERR_AUTH `__, `SQLITE_IOERR_BEGIN_ATOMIC `__, `SQLITE_IOERR_BLOCKED `__, `SQLITE_IOERR_CHECKRESERVEDLOCK `__, `SQLITE_IOERR_CLOSE `__, `SQLITE_IOERR_COMMIT_ATOMIC `__, `SQLITE_IOERR_CONVPATH `__, `SQLITE_IOERR_CORRUPTFS `__, `SQLITE_IOERR_DATA `__, `SQLITE_IOERR_DELETE `__, `SQLITE_IOERR_DELETE_NOENT `__, `SQLITE_IOERR_DIR_CLOSE `__, `SQLITE_IOERR_DIR_FSYNC `__, `SQLITE_IOERR_FSTAT `__, `SQLITE_IOERR_FSYNC `__, `SQLITE_IOERR_GETTEMPPATH `__, `SQLITE_IOERR_LOCK `__, `SQLITE_IOERR_MMAP `__, `SQLITE_IOERR_NOMEM `__, `SQLITE_IOERR_RDLOCK `__, `SQLITE_IOERR_READ `__, `SQLITE_IOERR_ROLLBACK_ATOMIC `__, `SQLITE_IOERR_SEEK `__, `SQLITE_IOERR_SHMLOCK `__, `SQLITE_IOERR_SHMMAP `__, `SQLITE_IOERR_SHMOPEN `__, `SQLITE_IOERR_SHMSIZE `__, `SQLITE_IOERR_SHORT_READ `__, `SQLITE_IOERR_TRUNCATE `__, `SQLITE_IOERR_UNLOCK `__, `SQLITE_IOERR_VNODE `__, `SQLITE_IOERR_WRITE `__, `SQLITE_LOCKED_SHAREDCACHE `__, `SQLITE_LOCKED_VTAB `__, `SQLITE_NOTICE_RECOVER_ROLLBACK `__, `SQLITE_NOTICE_RECOVER_WAL `__, `SQLITE_OK_LOAD_PERMANENTLY `__, `SQLITE_OK_SYMLINK `__, `SQLITE_READONLY_CANTINIT `__, `SQLITE_READONLY_CANTLOCK `__, `SQLITE_READONLY_DBMOVED `__, `SQLITE_READONLY_DIRECTORY `__, `SQLITE_READONLY_RECOVERY `__, `SQLITE_READONLY_ROLLBACK `__, `SQLITE_WARNING_AUTOINDEX `__ .. data:: mapping_file_control :type: typing.Dict[typing.Union[str, int], typing.Union[int, str]] `Standard File Control Opcodes `__ constants `SQLITE_FCNTL_BEGIN_ATOMIC_WRITE `__, `SQLITE_FCNTL_BUSYHANDLER `__, `SQLITE_FCNTL_CHUNK_SIZE `__, `SQLITE_FCNTL_CKPT_DONE `__, `SQLITE_FCNTL_CKPT_START `__, `SQLITE_FCNTL_CKSM_FILE `__, `SQLITE_FCNTL_COMMIT_ATOMIC_WRITE `__, `SQLITE_FCNTL_COMMIT_PHASETWO `__, `SQLITE_FCNTL_DATA_VERSION `__, `SQLITE_FCNTL_EXTERNAL_READER `__, `SQLITE_FCNTL_FILE_POINTER `__, `SQLITE_FCNTL_GET_LOCKPROXYFILE `__, `SQLITE_FCNTL_HAS_MOVED `__, `SQLITE_FCNTL_JOURNAL_POINTER `__, `SQLITE_FCNTL_LAST_ERRNO `__, `SQLITE_FCNTL_LOCKSTATE `__, `SQLITE_FCNTL_LOCK_TIMEOUT `__, `SQLITE_FCNTL_MMAP_SIZE `__, `SQLITE_FCNTL_OVERWRITE `__, `SQLITE_FCNTL_PDB `__, `SQLITE_FCNTL_PERSIST_WAL `__, `SQLITE_FCNTL_POWERSAFE_OVERWRITE `__, `SQLITE_FCNTL_PRAGMA `__, `SQLITE_FCNTL_RBU `__, `SQLITE_FCNTL_RESERVE_BYTES `__, `SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE `__, `SQLITE_FCNTL_SET_LOCKPROXYFILE `__, `SQLITE_FCNTL_SIZE_HINT `__, `SQLITE_FCNTL_SIZE_LIMIT `__, `SQLITE_FCNTL_SYNC `__, `SQLITE_FCNTL_SYNC_OMITTED `__, `SQLITE_FCNTL_TEMPFILENAME `__, `SQLITE_FCNTL_TRACE `__, `SQLITE_FCNTL_VFSNAME `__, `SQLITE_FCNTL_VFS_POINTER `__, `SQLITE_FCNTL_WAL_BLOCK `__, `SQLITE_FCNTL_WIN32_AV_RETRY `__, `SQLITE_FCNTL_WIN32_GET_HANDLE `__, `SQLITE_FCNTL_WIN32_SET_HANDLE `__, `SQLITE_FCNTL_ZIPVFS `__ .. data:: mapping_limits :type: typing.Dict[typing.Union[str, int], typing.Union[int, str]] `Run-Time Limit Categories `__ constants `SQLITE_LIMIT_ATTACHED `__, `SQLITE_LIMIT_COLUMN `__, `SQLITE_LIMIT_COMPOUND_SELECT `__, `SQLITE_LIMIT_EXPR_DEPTH `__, `SQLITE_LIMIT_FUNCTION_ARG `__, `SQLITE_LIMIT_LENGTH `__, `SQLITE_LIMIT_LIKE_PATTERN_LENGTH `__, `SQLITE_LIMIT_SQL_LENGTH `__, `SQLITE_LIMIT_TRIGGER_DEPTH `__, `SQLITE_LIMIT_VARIABLE_NUMBER `__, `SQLITE_LIMIT_VDBE_OP `__, `SQLITE_LIMIT_WORKER_THREADS `__ .. data:: mapping_locking_level :type: typing.Dict[typing.Union[str, int], typing.Union[int, str]] `File Locking Levels `__ constants `SQLITE_LOCK_EXCLUSIVE `__, `SQLITE_LOCK_NONE `__, `SQLITE_LOCK_PENDING `__, `SQLITE_LOCK_RESERVED `__, `SQLITE_LOCK_SHARED `__ .. data:: mapping_open_flags :type: typing.Dict[typing.Union[str, int], typing.Union[int, str]] `Flags For File Open Operations `__ constants `SQLITE_OPEN_AUTOPROXY `__, `SQLITE_OPEN_CREATE `__, `SQLITE_OPEN_DELETEONCLOSE `__, `SQLITE_OPEN_EXCLUSIVE `__, `SQLITE_OPEN_EXRESCODE `__, `SQLITE_OPEN_FULLMUTEX `__, `SQLITE_OPEN_MAIN_DB `__, `SQLITE_OPEN_MAIN_JOURNAL `__, `SQLITE_OPEN_MEMORY `__, `SQLITE_OPEN_NOFOLLOW `__, `SQLITE_OPEN_NOMUTEX `__, `SQLITE_OPEN_PRIVATECACHE `__, `SQLITE_OPEN_READONLY `__, `SQLITE_OPEN_READWRITE `__, `SQLITE_OPEN_SHAREDCACHE `__, `SQLITE_OPEN_SUBJOURNAL `__, `SQLITE_OPEN_SUPER_JOURNAL `__, `SQLITE_OPEN_TEMP_DB `__, `SQLITE_OPEN_TEMP_JOURNAL `__, `SQLITE_OPEN_TRANSIENT_DB `__, `SQLITE_OPEN_URI `__, `SQLITE_OPEN_WAL `__ .. data:: mapping_prepare_flags :type: typing.Dict[typing.Union[str, int], typing.Union[int, str]] `Prepare Flags `__ constants `SQLITE_PREPARE_NORMALIZE `__, `SQLITE_PREPARE_NO_VTAB `__, `SQLITE_PREPARE_PERSISTENT `__ .. data:: mapping_result_codes :type: typing.Dict[typing.Union[str, int], typing.Union[int, str]] `Result Codes `__ constants `SQLITE_ABORT `__, `SQLITE_AUTH `__, `SQLITE_BUSY `__, `SQLITE_CANTOPEN `__, `SQLITE_CONSTRAINT `__, `SQLITE_CORRUPT `__, `SQLITE_DONE `__, `SQLITE_EMPTY `__, `SQLITE_ERROR `__, `SQLITE_FORMAT `__, `SQLITE_FULL `__, `SQLITE_INTERNAL `__, `SQLITE_INTERRUPT `__, `SQLITE_IOERR `__, `SQLITE_LOCKED `__, `SQLITE_MISMATCH `__, `SQLITE_MISUSE `__, `SQLITE_NOLFS `__, `SQLITE_NOMEM `__, `SQLITE_NOTADB `__, `SQLITE_NOTFOUND `__, `SQLITE_NOTICE `__, `SQLITE_OK `__, `SQLITE_PERM `__, `SQLITE_PROTOCOL `__, `SQLITE_RANGE `__, `SQLITE_READONLY `__, `SQLITE_ROW `__, `SQLITE_SCHEMA `__, `SQLITE_TOOBIG `__, `SQLITE_WARNING `__ .. data:: mapping_status :type: typing.Dict[typing.Union[str, int], typing.Union[int, str]] `Status Parameters `__ constants `SQLITE_STATUS_MALLOC_COUNT `__, `SQLITE_STATUS_MALLOC_SIZE `__, `SQLITE_STATUS_MEMORY_USED `__, `SQLITE_STATUS_PAGECACHE_OVERFLOW `__, `SQLITE_STATUS_PAGECACHE_SIZE `__, `SQLITE_STATUS_PAGECACHE_USED `__, `SQLITE_STATUS_PARSER_STACK `__, `SQLITE_STATUS_SCRATCH_OVERFLOW `__, `SQLITE_STATUS_SCRATCH_SIZE `__, `SQLITE_STATUS_SCRATCH_USED `__ .. data:: mapping_sync :type: typing.Dict[typing.Union[str, int], typing.Union[int, str]] `Synchronization Type Flags `__ constants `SQLITE_SYNC_DATAONLY `__, `SQLITE_SYNC_FULL `__, `SQLITE_SYNC_NORMAL `__ .. data:: mapping_txn_state :type: typing.Dict[typing.Union[str, int], typing.Union[int, str]] `Allowed return values from [sqlite3_txn_state()] `__ constants `SQLITE_TXN_NONE `__, `SQLITE_TXN_READ `__, `SQLITE_TXN_WRITE `__ .. data:: mapping_virtual_table_configuration_options :type: typing.Dict[typing.Union[str, int], typing.Union[int, str]] `Virtual Table Configuration Options `__ constants `SQLITE_VTAB_CONSTRAINT_SUPPORT `__, `SQLITE_VTAB_DIRECTONLY `__, `SQLITE_VTAB_INNOCUOUS `__ .. data:: mapping_virtual_table_scan_flags :type: typing.Dict[typing.Union[str, int], typing.Union[int, str]] `Virtual Table Scan Flags `__ constants `SQLITE_INDEX_SCAN_UNIQUE `__ .. data:: mapping_wal_checkpoint :type: typing.Dict[typing.Union[str, int], typing.Union[int, str]] `Checkpoint Mode Values `__ constants `SQLITE_CHECKPOINT_FULL `__, `SQLITE_CHECKPOINT_PASSIVE `__, `SQLITE_CHECKPOINT_RESTART `__, `SQLITE_CHECKPOINT_TRUNCATE `__ .. data:: mapping_xshmlock_flags :type: typing.Dict[typing.Union[str, int], typing.Union[int, str]] `Flags for the xShmLock VFS method `__ constants `SQLITE_SHM_EXCLUSIVE `__, `SQLITE_SHM_LOCK `__, `SQLITE_SHM_SHARED `__, `SQLITE_SHM_UNLOCK `__