.. 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_stubs: Type Annotations ================ Comprehensive `type annotations `__ `are included `__, and your code can be checked using tools like `mypy `__. You can refer to the types below for your annotations (eg as :class:`apsw.SQLiteValue`) Your source files should include:: from __future__ import annotations .. note:: These types are **not** available at run time, and have no effect when your code is running. They are only referenced when running a type checker, or using an `IDE `__. You will require a recent version of Python to use the type annotations. .. 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.44.1 will have the value *3440100*. This number may be different than the actual library in use if the library is shared and has been updated. Call :meth:`sqlite_lib_version` to get the actual library version. .. method:: allow_missing_dict_bindings(value: bool) -> bool Changes how missing bindings are handled when using a :class:`dict`. Historically missing bindings were treated as *None*. It was anticipated that dict bindings would be used when there were lots of columns, so having missing ones defaulting to *None* was convenient. Unfortunately this also has the side effect of not catching typos and similar issues. APSW 3.41.0.0 changed the default so that missing dict entries will result in an exception. Call this with *True* to restore the earlier behaviour, and *False* to have an exception. The previous value is returned. .. method:: apsw_version() -> 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. It does not consider comments or blank lines to be complete. 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* Some operations don't make sense from a Python program. All the remaining are supported. 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. .. method:: connections() -> list[Connection] Returns a list of the connections .. index:: sqlite3_enable_shared_cache .. method:: enable_shared_cache(enable: bool) -> None `Discouraged `__. Calls: `sqlite3_enable_shared_cache `__ .. method:: exception_for(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.exception_for(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 can use 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 SQLite syntax. Note that SQLite represents floating point `Nan `__ as :code:`NULL`, infinity as :code:`1e999` and loses the sign on `negative zero `__. .. index:: sqlite3_hard_heap_limit64 .. method:: hard_heap_limit(limit: int) -> int Enforces SQLite keeping memory usage below *limit* bytes and returns the previous limit. .. seealso:: :meth:`soft_heap_limit` Calls: `sqlite3_hard_heap_limit64 `__ .. 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. You must format the message before passing it to this method:: apsw.log(apsw.SQLITE_NOMEM, f"Need { needed } bytes of memory") Calls: `sqlite3_log `__ .. index:: sqlite3_memory_highwater .. method:: memory_high_water(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:: memory_used() -> int Returns the amount of memory SQLite is currently using. .. seealso:: :meth:`status` Calls: `sqlite3_memory_used `__ .. attribute:: no_change :type: object A sentinel value used to indicate no change in a value when used with :meth:`VTCursor.ColumnNoChange` and :meth:`VTTable.UpdateChangeRow` .. 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:: release_memory(amount: int) -> int Requests SQLite try to free *amount* bytes of memory. Returns how many bytes were freed. Calls: `sqlite3_release_memory `__ .. index:: sqlite3_vfs_register, sqlite3_vfs_find .. method:: set_default_vfs(name: str) -> None Sets the default vfs to *name* which must be an existing vfs. See :meth:`vfs_names`. Calls: * `sqlite3_vfs_register `__ * `sqlite3_vfs_find `__ .. 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_sleep .. method:: sleep(milliseconds: int) -> int Sleep for at least the number of `milliseconds`, returning how many milliseconds were requested from the operating system. Calls: `sqlite3_sleep `__ .. index:: sqlite3_soft_heap_limit64 .. method:: soft_heap_limit(limit: int) -> int Requests SQLite try to keep memory usage below *limit* bytes and returns the previous limit. .. seealso:: :meth:`hard_heap_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:: sqlite_lib_version() -> 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:: * :meth:`Connection.status` for statistics about a :class:`Connection` * :ref:`Status example ` Calls: `sqlite3_status64 `__ .. index:: sqlite3_strglob .. method:: strglob(glob: str, string: str) -> int Does string GLOB matching. Zero is returned on a match. Calls: `sqlite3_strglob `__ .. index:: sqlite3_stricmp .. method:: stricmp(string1: str, string2: str) -> int Does string case-insensitive comparison. Zero is returned on a match. Calls: `sqlite3_stricmp `__ .. index:: sqlite3_strlike .. method:: strlike(glob: str, string: str, escape: int = 0) -> int Does string LIKE matching. Zero is returned on a match. Calls: `sqlite3_strlike `__ .. index:: sqlite3_strnicmp .. method:: strnicmp(string1: str, string2: str, count: int) -> int Does string case-insensitive comparison. Zero is returned on a match. Calls: `sqlite3_strnicmp `__ .. index:: sqlite3_vfs_unregister, sqlite3_vfs_find .. method:: unregister_vfs(name: str) -> None Unregisters the named vfs. See :meth:`vfs_names`. Calls: * `sqlite3_vfs_unregister `__ * `sqlite3_vfs_find `__ .. 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. .. index:: sqlite3_vfs_find .. method:: vfs_details() -> list[dict[str, int | str]] Returns a list with details of each :ref:`vfs `. The detail is a dictionary with the keys being the names of the `sqlite3_vfs `__ data structure, and their corresponding values. Pointers are converted using `PyLong_FromVoidPtr `__. Calls: `sqlite3_vfs_find `__ .. index:: sqlite3_vfs_find .. method:: vfs_names() -> list[str] Returns a list of the currently installed :ref:`vfs `. The first item in the list is the default vfs. Calls: `sqlite3_vfs_find `__ .. _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: dict[str | int, int | str] `Flags for the xAccess VFS method `__ constants `SQLITE_ACCESS_EXISTS `__, `SQLITE_ACCESS_READ `__, `SQLITE_ACCESS_READWRITE `__ .. data:: mapping_authorizer_function :type: dict[str | int, 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_codes :type: dict[str | int, int | str] `Authorizer Return Codes `__ constants `SQLITE_DENY `__, `SQLITE_IGNORE `__, `SQLITE_OK `__ .. data:: mapping_bestindex_constraints :type: dict[str | int, 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: dict[str | int, 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: dict[str | int, int | str] `Conflict resolution modes `__ constants `SQLITE_ABORT `__, `SQLITE_FAIL `__, `SQLITE_IGNORE `__, `SQLITE_REPLACE `__, `SQLITE_ROLLBACK `__ .. data:: mapping_db_config :type: dict[str | int, 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_REVERSE_SCANORDER `__, `SQLITE_DBCONFIG_STMT_SCANSTATUS `__, `SQLITE_DBCONFIG_TRIGGER_EQP `__, `SQLITE_DBCONFIG_TRUSTED_SCHEMA `__, `SQLITE_DBCONFIG_WRITABLE_SCHEMA `__ .. data:: mapping_db_status :type: dict[str | int, 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: dict[str | int, 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: dict[str | int, 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_IN_PAGE `__, `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_RBU `__, `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: dict[str | int, 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_RESET_CACHE `__, `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_function_flags :type: dict[str | int, int | str] `Function Flags `__ constants `SQLITE_DETERMINISTIC `__, `SQLITE_DIRECTONLY `__, `SQLITE_INNOCUOUS `__, `SQLITE_RESULT_SUBTYPE `__, `SQLITE_SUBTYPE `__ .. data:: mapping_limits :type: dict[str | int, 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: dict[str | int, 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: dict[str | int, 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: dict[str | int, int | str] `Prepare Flags `__ constants `SQLITE_PREPARE_NORMALIZE `__, `SQLITE_PREPARE_NO_VTAB `__, `SQLITE_PREPARE_PERSISTENT `__ .. data:: mapping_result_codes :type: dict[str | int, 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_statement_status :type: dict[str | int, int | str] `Status Parameters for prepared statements `__ constants `SQLITE_STMTSTATUS_AUTOINDEX `__, `SQLITE_STMTSTATUS_FILTER_HIT `__, `SQLITE_STMTSTATUS_FILTER_MISS `__, `SQLITE_STMTSTATUS_FULLSCAN_STEP `__, `SQLITE_STMTSTATUS_MEMUSED `__, `SQLITE_STMTSTATUS_REPREPARE `__, `SQLITE_STMTSTATUS_RUN `__, `SQLITE_STMTSTATUS_SORT `__, `SQLITE_STMTSTATUS_VM_STEP `__ .. data:: mapping_status :type: dict[str | int, 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: dict[str | int, int | str] `Synchronization Type Flags `__ constants `SQLITE_SYNC_DATAONLY `__, `SQLITE_SYNC_FULL `__, `SQLITE_SYNC_NORMAL `__ .. data:: mapping_trace_codes :type: dict[str | int, int | str] `SQL Trace Event Codes `__ constants `SQLITE_TRACE_CLOSE `__, `SQLITE_TRACE_PROFILE `__, `SQLITE_TRACE_ROW `__, `SQLITE_TRACE_STMT `__ .. data:: mapping_txn_state :type: dict[str | int, 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: dict[str | int, int | str] `Virtual Table Configuration Options `__ constants `SQLITE_VTAB_CONSTRAINT_SUPPORT `__, `SQLITE_VTAB_DIRECTONLY `__, `SQLITE_VTAB_INNOCUOUS `__, `SQLITE_VTAB_USES_ALL_SCHEMAS `__ .. data:: mapping_virtual_table_scan_flags :type: dict[str | int, int | str] `Virtual Table Scan Flags `__ constants `SQLITE_INDEX_SCAN_UNIQUE `__ .. data:: mapping_wal_checkpoint :type: dict[str | int, int | str] `Checkpoint Mode Values `__ constants `SQLITE_CHECKPOINT_FULL `__, `SQLITE_CHECKPOINT_PASSIVE `__, `SQLITE_CHECKPOINT_RESTART `__, `SQLITE_CHECKPOINT_TRUNCATE `__ .. data:: mapping_xshmlock_flags :type: dict[str | int, int | str] `Flags for the xShmLock VFS method `__ constants `SQLITE_SHM_EXCLUSIVE `__, `SQLITE_SHM_LOCK `__, `SQLITE_SHM_SHARED `__, `SQLITE_SHM_UNLOCK `__