.. 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 :mod:`type annotations <typing>` :source:`are included
<apsw/__init__.pyi>`, and your code can be checked by your editor or
tools like `mypy <https://mypy-lang.org/>`__.  You can refer to the
types below for your annotations (eg as :class:`apsw.SQLiteValue`)

Your source files should include this line, which can be omitted in
Python 3.14 onwards::

    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
  <https://en.wikipedia.org/wiki/Language_Server_Protocol>`__.

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.

.. attribute:: async_controller
    :type: type[AsyncConnectionController]

    This sets the controller for :meth:`Connection.as_async`.  It will use
    :func:`apsw.aio.Auto` if not explicitly set.

.. attribute:: async_cursor_prefetch
    :type: contextvars.ContextVar[int]

    When iterating on a :class:`Cursor` in async mode, it is more
    efficient to get multiple result rows at once.  This controls how many
    that is.  The default is 64 if not set. See :doc:`async` for details.
    Typical usage is:

    .. code-block:: python

      with apsw.aio.contextvar_set(apsw.async_cursor_prefetch, 1):
        async for row in await db.execute("SELECT ..."):
            print(f"{row=})

.. attribute:: async_run_coro
    :type: Callable[[Coroutine], Any]

    When APSW encounters a :class:`~typing.Coroutine` this called to run
    it and block until getting the result.  The callable would typically
    have the coroutine run in the event loop.  See :doc:`async` for
    details.

    This is a per-thread value.

.. method:: carray(object: collections.abc.Buffer | tuple[str, ...] | tuple[collections.abc.Buffer, ...], *, start: int = 0, stop: int = -1, flags: int = -1) -> CArrayBinding

  Indicates a Python object is being provided as a runtime array for the
  `Carray extension <https://sqlite.org/carray.html>`__.  This is to provide
  bulk numbers (int or float), strings, or blobs to a query,  The array will
  be used without calling back into Python code or acquiring the GIL.  It takes
  about 5% of the CPU time using Carray versus passing each value in one at a
  time via Python.

  See the :ref:`example <example_carray>`.

  :param object: For numbers, any object that implements the buffer protocol as
     a single contiguous binary data like :class:`bytes`, :class:`bytearray`,
     :class:`array.array`, numpy.array etc.

     Otherwise it should be a tuple of strings, or a tuple of binary data
     objects.  All elements must be the same type.
  :param start: Index of the first entry to bind
  :param stop: Index to stop at - ie one beyond the last entry bound.  Default
      is all remaining members.
  :param flags: Default auto detect.

      For numbers, detection is done from the buffer
      `format code <https://docs.python.org/3/library/struct.html#byte-order-size-and-alignment>`__
      and itemsize.  You can use ``format`` and ``itemsize`` attributes of :code:`memoryview(object)`
      to see what they are.

      Format ``i``, ``l``, ``q``
          ``SQLITE_CARRAY_INT32`` or ``SQLITE_CARRAY_INT64`` based on itemsize
      Format  ``d``
          ``SQLITE_CARRAY_DOUBLE``

      You can explicitly provide the type such as :code:`apsw.SQLITE_CARRAY_INT32`.  If
      it is incorrect then the values will be nonsense.

      If using a tuple of string or blobs, you can specify :code:`apsw.SQLITE_CARRAY_TEXT`
      and :code:`apsw.SQLITE_CARRAY_BLOB` respectively, but they would be detected anyway.
      A wrong value will fail.

  .. note::

    Carray support is only present if APSW was compiled with ``SQLITE_ENABLE_CARRAY`` such as
    PyPi builds.  The array must have at least one member and at most 2 billion.

.. 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, but with around 50 entries::

        ('ENABLE_LOCKING_STYLE=0', 'TEMP_STORE=1', 'THREADSAFE=1', 'ENABLE_FTS5',
         'OMIT_SHARED_CACHE', 'SYSTEM_MALLOC')

    Calls: `sqlite3_compileoption_get <https://sqlite.org/c3ref/compileoption_get.html>`__

.. 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 <https://sqlite.org/c3ref/complete.html>`__

.. index:: sqlite3_config

.. method:: config(op: int, *args: typing.Any) -> None

  :param op: A `configuration operation <https://sqlite.org/c3ref/c_config_covering_index_scan.html>`_
  :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 <https://sqlite.org/c3ref/config.html>`__

.. attribute:: connection_hooks
       :type: list[Callable[[Connection], None]]

       The purpose of the hooks is to allow the easy registration of
       :meth:`functions <Connection.create_scalar_function>`,
       :ref:`virtual tables <virtualtables>` 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 open connections

.. index:: sqlite3_enable_shared_cache

.. method:: enable_shared_cache(enable: bool) -> None

  `Discouraged
  <https://sqlite.org/sharedcache.html#use_of_shared_cache_is_discouraged>`__.

  Calls: `sqlite3_enable_shared_cache <https://sqlite.org/c3ref/enable_shared_cache.html>`__

.. method:: exception_for(code: int) -> Exception

  If you would like to raise an exception that corresponds to a
  particular SQLite `error code
  <https://sqlite.org/c3ref/c_abort.html>`_ then call this function.
  It also understands `extended error codes
  <https://sqlite.org/c3ref/c_abort_rollback.html>`_.

  For example to raise `SQLITE_IOERR_ACCESS <https://sqlite.org/rescode.html#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
  <https://en.wikipedia.org/wiki/Fork_(operating_system)>`__ processes
  (see the `SQLite FAQ Q6 <https://sqlite.org/faq.html#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
  :mod:`multiprocessing module <multiprocessing>` which can use
  fork to make child processes in less recent Python versions.

  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
  <https://docs.python.org/3/library/multiprocessing.html#process-and-exceptions>`__.
  (Note you must call close to ensure the underlying SQLite objects are
  closed.  It is also a good idea to call :func:`gc.collect(2)
  <gc.collect>` 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
  :func:`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.)

  Calling this method requires doing a :func:`shutdown` which means there
  can be no active connections.

  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
  <https://en.wikipedia.org/wiki/NaN>`__ as :code:`NULL`, infinity as
  :code:`9e999` and loses the sign on `negative zero
  <https://en.wikipedia.org/wiki/Signed_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 <https://sqlite.org/c3ref/hard_heap_limit64.html>`__

.. index:: sqlite3_initialize

.. method:: initialize() -> None

  It is unlikely you will want to call this method as SQLite automatically initializes.

  Calls: `sqlite3_initialize <https://sqlite.org/c3ref/initialize.html>`__

.. index:: sqlite3_keyword_count, sqlite3_keyword_name

.. attribute:: keywords
    :type: set[str]

    A set containing every SQLite keyword

    Calls:
      * `sqlite3_keyword_count <https://sqlite.org/c3ref/keyword_check.html>`__
      * `sqlite3_keyword_name <https://sqlite.org/c3ref/keyword_check.html>`__

.. 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 <https://sqlite.org/c3ref/log.html>`__

.. 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 <https://sqlite.org/c3ref/memory_highwater.html>`__

.. index:: sqlite3_memory_used

.. method:: memory_used() -> int

  Returns the amount of memory SQLite is currently using.

  .. seealso::
    :meth:`status`

  Calls: `sqlite3_memory_used <https://sqlite.org/c3ref/memory_highwater.html>`__

.. attribute:: no_change
    :type: object

    A sentinel value used to indicate no change in a value when
    used with :meth:`VTCursor.ColumnNoChange`,
    :meth:`VTTable.UpdateChangeRow`, :attr:`TableChange.new`,
    and :class:`PreUpdate.update`.

.. method:: pyobject(object: typing.Any) -> PyObjectBinding

  Indicates a Python object is being provided as a
  :ref:`runtime value <pyobject>`.

.. 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 <https://sqlite.org/c3ref/randomness.html>`__

.. 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 <https://sqlite.org/c3ref/release_memory.html>`__

.. 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 <https://sqlite.org/c3ref/vfs_find.html>`__
   * `sqlite3_vfs_find <https://sqlite.org/c3ref/vfs_find.html>`__

.. index:: sqlite3_shutdown

.. method:: shutdown() -> None

  It is unlikely you will want to call this method and there is no need
  to do so.  You will get :exc:`MisuseError` if there are any
  :func:`connections active <connections>` and need to close them first.

  VFS remain registered across a shutdown and initialise.

  Calls: `sqlite3_shutdown <https://sqlite.org/c3ref/initialize.html>`__

.. 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 <https://sqlite.org/c3ref/sleep.html>`__

.. 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 <https://sqlite.org/c3ref/hard_heap_limit64.html>`__

.. index:: sqlite3_sourceid

.. method:: sqlite3_sourceid() -> str

    Returns the exact checkin information for the SQLite 3 source
    being used.

    Calls: `sqlite3_sourceid <https://sqlite.org/c3ref/libversion.html>`__

.. 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 <https://sqlite.org/c3ref/libversion.html>`__

.. index:: sqlite3_status64

.. method:: status(op: int, reset: bool = False) -> tuple[int, int]

  Returns current and highwater measurements.

  :param op: A `status parameter <https://sqlite.org/c3ref/c_status_malloc_count.html>`_
  :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 <example_status>`

  Calls: `sqlite3_status64 <https://sqlite.org/c3ref/status.html>`__

.. index:: sqlite3_strglob

.. method:: strglob(glob: str, string: str) -> int

  Does string GLOB matching.  Zero is returned on a match.

  Calls: `sqlite3_strglob <https://sqlite.org/c3ref/strglob.html>`__

.. index:: sqlite3_stricmp

.. method:: stricmp(string1: str, string2: str) -> int

  Does string case-insensitive comparison.  Zero is returned
  on a match.

  Calls: `sqlite3_stricmp <https://sqlite.org/c3ref/stricmp.html>`__

.. 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 <https://sqlite.org/c3ref/strlike.html>`__

.. 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 <https://sqlite.org/c3ref/stricmp.html>`__

.. 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 <https://sqlite.org/c3ref/vfs_find.html>`__
   * `sqlite3_vfs_find <https://sqlite.org/c3ref/vfs_find.html>`__

.. attribute:: using_amalgamation
      :type: bool

      If True then `SQLite amalgamation
      <https://www.sqlite.org/amalgamation.html>`__ 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 <vfs>`.  The detail is a
dictionary with the keys being the names of the `sqlite3_vfs
<https://sqlite.org/c3ref/vfs.html>`__ data structure, and their
corresponding values.

Pointers are converted using :c:func:`PyLong_FromVoidPtr`.

Calls: `sqlite3_vfs_find <https://sqlite.org/c3ref/vfs_find.html>`__

.. index:: sqlite3_vfs_find

.. method:: vfs_names() -> list[str]

  Returns a list of the currently installed :ref:`vfs <vfs>`.  The first
  item in the list is the default vfs.

  Calls: `sqlite3_vfs_find <https://sqlite.org/c3ref/vfs_find.html>`__

.. _sqliteconstants:

SQLite constants
================

SQLite has `many constants
<https://sqlite.org/c3ref/constlist.html>`_ 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 <https://sqlite.org/c3ref/c_access_exists.html>`__ constants

    `SQLITE_ACCESS_EXISTS <https://sqlite.org/c3ref/c_access_exists.html>`__, `SQLITE_ACCESS_READ <https://sqlite.org/c3ref/c_access_exists.html>`__, `SQLITE_ACCESS_READWRITE <https://sqlite.org/c3ref/c_access_exists.html>`__

.. data:: mapping_authorizer_function
    :type: dict[str | int, int | str]

    `Authorizer Action Codes <https://sqlite.org/c3ref/c_alter_table.html>`__ constants

    `SQLITE_ALTER_TABLE <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_ANALYZE <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_ATTACH <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_COPY <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_CREATE_INDEX <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_CREATE_TABLE <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_CREATE_TEMP_INDEX <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_CREATE_TEMP_TABLE <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_CREATE_TEMP_TRIGGER <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_CREATE_TEMP_VIEW <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_CREATE_TRIGGER <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_CREATE_VIEW <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_CREATE_VTABLE <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_DELETE <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_DETACH <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_DROP_INDEX <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_DROP_TABLE <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_DROP_TEMP_INDEX <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_DROP_TEMP_TABLE <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_DROP_TEMP_TRIGGER <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_DROP_TEMP_VIEW <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_DROP_TRIGGER <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_DROP_VIEW <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_DROP_VTABLE <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_FUNCTION <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_INSERT <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_PRAGMA <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_READ <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_RECURSIVE <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_REINDEX <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_SAVEPOINT <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_SELECT <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_TRANSACTION <https://sqlite.org/c3ref/c_alter_table.html>`__, `SQLITE_UPDATE <https://sqlite.org/c3ref/c_alter_table.html>`__

.. data:: mapping_authorizer_return_codes
    :type: dict[str | int, int | str]

    `Authorizer Return Codes <https://sqlite.org/c3ref/c_deny.html>`__ constants

    `SQLITE_DENY <https://sqlite.org/c3ref/c_deny.html>`__, `SQLITE_IGNORE <https://sqlite.org/c3ref/c_fail.html>`__, `SQLITE_OK <https://sqlite.org/c3ref/c_deny.html>`__

.. data:: mapping_bestindex_constraints
    :type: dict[str | int, int | str]

    `Virtual Table Constraint Operator Codes <https://sqlite.org/c3ref/c_index_constraint_eq.html>`__ constants

    `SQLITE_INDEX_CONSTRAINT_EQ <https://sqlite.org/c3ref/c_index_constraint_eq.html>`__, `SQLITE_INDEX_CONSTRAINT_FUNCTION <https://sqlite.org/c3ref/c_index_constraint_eq.html>`__, `SQLITE_INDEX_CONSTRAINT_GE <https://sqlite.org/c3ref/c_index_constraint_eq.html>`__, `SQLITE_INDEX_CONSTRAINT_GLOB <https://sqlite.org/c3ref/c_index_constraint_eq.html>`__, `SQLITE_INDEX_CONSTRAINT_GT <https://sqlite.org/c3ref/c_index_constraint_eq.html>`__, `SQLITE_INDEX_CONSTRAINT_IS <https://sqlite.org/c3ref/c_index_constraint_eq.html>`__, `SQLITE_INDEX_CONSTRAINT_ISNOT <https://sqlite.org/c3ref/c_index_constraint_eq.html>`__, `SQLITE_INDEX_CONSTRAINT_ISNOTNULL <https://sqlite.org/c3ref/c_index_constraint_eq.html>`__, `SQLITE_INDEX_CONSTRAINT_ISNULL <https://sqlite.org/c3ref/c_index_constraint_eq.html>`__, `SQLITE_INDEX_CONSTRAINT_LE <https://sqlite.org/c3ref/c_index_constraint_eq.html>`__, `SQLITE_INDEX_CONSTRAINT_LIKE <https://sqlite.org/c3ref/c_index_constraint_eq.html>`__, `SQLITE_INDEX_CONSTRAINT_LIMIT <https://sqlite.org/c3ref/c_index_constraint_eq.html>`__, `SQLITE_INDEX_CONSTRAINT_LT <https://sqlite.org/c3ref/c_index_constraint_eq.html>`__, `SQLITE_INDEX_CONSTRAINT_MATCH <https://sqlite.org/c3ref/c_index_constraint_eq.html>`__, `SQLITE_INDEX_CONSTRAINT_NE <https://sqlite.org/c3ref/c_index_constraint_eq.html>`__, `SQLITE_INDEX_CONSTRAINT_OFFSET <https://sqlite.org/c3ref/c_index_constraint_eq.html>`__, `SQLITE_INDEX_CONSTRAINT_REGEXP <https://sqlite.org/c3ref/c_index_constraint_eq.html>`__

.. data:: mapping_carray
    :type: dict[str | int, int | str]

    `Datatypes for the CARRAY table-valued function <https://sqlite.org/c3ref/c_carray_blob.html>`__ constants

    `SQLITE_CARRAY_BLOB <https://sqlite.org/c3ref/c_carray_blob.html>`__, `SQLITE_CARRAY_DOUBLE <https://sqlite.org/c3ref/c_carray_blob.html>`__, `SQLITE_CARRAY_INT32 <https://sqlite.org/c3ref/c_carray_blob.html>`__, `SQLITE_CARRAY_INT64 <https://sqlite.org/c3ref/c_carray_blob.html>`__, `SQLITE_CARRAY_TEXT <https://sqlite.org/c3ref/c_carray_blob.html>`__

.. data:: mapping_config
    :type: dict[str | int, int | str]

    `Configuration Options <https://sqlite.org/c3ref/c_config_covering_index_scan.html>`__ constants

    `SQLITE_CONFIG_COVERING_INDEX_SCAN <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfigcoveringindexscan>`__, `SQLITE_CONFIG_GETMALLOC <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfiggetmalloc>`__, `SQLITE_CONFIG_GETMUTEX <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfiggetmutex>`__, `SQLITE_CONFIG_GETPCACHE <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfiggetpcache>`__, `SQLITE_CONFIG_GETPCACHE2 <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfiggetpcache2>`__, `SQLITE_CONFIG_HEAP <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfigheap>`__, `SQLITE_CONFIG_LOG <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfiglog>`__, `SQLITE_CONFIG_LOOKASIDE <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfiglookaside>`__, `SQLITE_CONFIG_MALLOC <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfigmalloc>`__, `SQLITE_CONFIG_MEMDB_MAXSIZE <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfigmemdbmaxsize>`__, `SQLITE_CONFIG_MEMSTATUS <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfigmemstatus>`__, `SQLITE_CONFIG_MMAP_SIZE <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfigmmapsize>`__, `SQLITE_CONFIG_MULTITHREAD <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfigmultithread>`__, `SQLITE_CONFIG_MUTEX <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfigmutex>`__, `SQLITE_CONFIG_PAGECACHE <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfigpagecache>`__, `SQLITE_CONFIG_PCACHE <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfigpcache>`__, `SQLITE_CONFIG_PCACHE2 <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfigpcache2>`__, `SQLITE_CONFIG_PCACHE_HDRSZ <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfigpcachehdrsz>`__, `SQLITE_CONFIG_PMASZ <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfigpmasz>`__, `SQLITE_CONFIG_SCRATCH <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfigscratch>`__, `SQLITE_CONFIG_SERIALIZED <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfigserialized>`__, `SQLITE_CONFIG_SINGLETHREAD <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfigsinglethread>`__, `SQLITE_CONFIG_SMALL_MALLOC <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfigsmallmalloc>`__, `SQLITE_CONFIG_SORTERREF_SIZE <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfigsorterrefsize>`__, `SQLITE_CONFIG_SQLLOG <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfigsqllog>`__, `SQLITE_CONFIG_STMTJRNL_SPILL <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfigstmtjrnlspill>`__, `SQLITE_CONFIG_URI <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfiguri>`__, `SQLITE_CONFIG_WIN32_HEAPSIZE <https://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfigwin32heapsize>`__

.. data:: mapping_conflict_resolution_modes
    :type: dict[str | int, int | str]

    `Conflict resolution modes <https://sqlite.org/c3ref/c_fail.html>`__ constants

    `SQLITE_ABORT <https://sqlite.org/c3ref/c_fail.html>`__, `SQLITE_FAIL <https://sqlite.org/c3ref/c_fail.html>`__, `SQLITE_IGNORE <https://sqlite.org/c3ref/c_fail.html>`__, `SQLITE_REPLACE <https://sqlite.org/c3ref/c_fail.html>`__, `SQLITE_ROLLBACK <https://sqlite.org/c3ref/c_fail.html>`__

.. data:: mapping_db_config
    :type: dict[str | int, int | str]

    `Database Connection Configuration Options <https://sqlite.org/c3ref/c_dbconfig_defensive.html>`__ constants

    `SQLITE_DBCONFIG_DEFENSIVE <https://sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigdefensive>`__, `SQLITE_DBCONFIG_DQS_DDL <https://sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigdqsddl>`__, `SQLITE_DBCONFIG_DQS_DML <https://sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigdqsdml>`__, `SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE <https://sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigenableattachcreate>`__, `SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE <https://sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigenableattachwrite>`__, `SQLITE_DBCONFIG_ENABLE_COMMENTS <https://sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigenablecomments>`__, `SQLITE_DBCONFIG_ENABLE_FKEY <https://sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigenablefkey>`__, `SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER <https://sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigenablefts3tokenizer>`__, `SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION <https://sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigenableloadextension>`__, `SQLITE_DBCONFIG_ENABLE_QPSG <https://sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigenableqpsg>`__, `SQLITE_DBCONFIG_ENABLE_TRIGGER <https://sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigenabletrigger>`__, `SQLITE_DBCONFIG_ENABLE_VIEW <https://sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigenableview>`__, `SQLITE_DBCONFIG_FP_DIGITS <https://sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigfpdigits>`__, `SQLITE_DBCONFIG_LEGACY_ALTER_TABLE <https://sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfiglegacyaltertable>`__, `SQLITE_DBCONFIG_LEGACY_FILE_FORMAT <https://sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfiglegacyfileformat>`__, `SQLITE_DBCONFIG_LOOKASIDE <https://sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfiglookaside>`__, `SQLITE_DBCONFIG_MAINDBNAME <https://sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigmaindbname>`__, `SQLITE_DBCONFIG_MAX <https://sqlite.org/c3ref/c_dbconfig_defensive.html>`__, `SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE <https://sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfignockptonclose>`__, `SQLITE_DBCONFIG_RESET_DATABASE <https://sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigresetdatabase>`__, `SQLITE_DBCONFIG_REVERSE_SCANORDER <https://sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigreversescanorder>`__, `SQLITE_DBCONFIG_STMT_SCANSTATUS <https://sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigstmtscanstatus>`__, `SQLITE_DBCONFIG_TRIGGER_EQP <https://sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigtriggereqp>`__, `SQLITE_DBCONFIG_TRUSTED_SCHEMA <https://sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigtrustedschema>`__, `SQLITE_DBCONFIG_WRITABLE_SCHEMA <https://sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigwritableschema>`__

.. data:: mapping_db_status
    :type: dict[str | int, int | str]

    `Status Parameters for database connections <https://sqlite.org/c3ref/c_dbstatus_options.html>`__ constants

    `SQLITE_DBSTATUS_CACHE_HIT <https://sqlite.org/c3ref/c_dbstatus_options.html#sqlitedbstatuscachehit>`__, `SQLITE_DBSTATUS_CACHE_MISS <https://sqlite.org/c3ref/c_dbstatus_options.html#sqlitedbstatuscachemiss>`__, `SQLITE_DBSTATUS_CACHE_SPILL <https://sqlite.org/c3ref/c_dbstatus_options.html#sqlitedbstatuscachespill>`__, `SQLITE_DBSTATUS_CACHE_USED <https://sqlite.org/c3ref/c_dbstatus_options.html#sqlitedbstatuscacheused>`__, `SQLITE_DBSTATUS_CACHE_USED_SHARED <https://sqlite.org/c3ref/c_dbstatus_options.html#sqlitedbstatuscacheusedshared>`__, `SQLITE_DBSTATUS_CACHE_WRITE <https://sqlite.org/c3ref/c_dbstatus_options.html#sqlitedbstatuscachewrite>`__, `SQLITE_DBSTATUS_DEFERRED_FKS <https://sqlite.org/c3ref/c_dbstatus_options.html#sqlitedbstatusdeferredfks>`__, `SQLITE_DBSTATUS_LOOKASIDE_HIT <https://sqlite.org/c3ref/c_dbstatus_options.html#sqlitedbstatuslookasidehit>`__, `SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL <https://sqlite.org/c3ref/c_dbstatus_options.html#sqlitedbstatuslookasidemissfull>`__, `SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE <https://sqlite.org/c3ref/c_dbstatus_options.html#sqlitedbstatuslookasidemisssize>`__, `SQLITE_DBSTATUS_LOOKASIDE_USED <https://sqlite.org/c3ref/c_dbstatus_options.html#sqlitedbstatuslookasideused>`__, `SQLITE_DBSTATUS_MAX <https://sqlite.org/c3ref/c_dbstatus_options.html>`__, `SQLITE_DBSTATUS_SCHEMA_USED <https://sqlite.org/c3ref/c_dbstatus_options.html#sqlitedbstatusschemaused>`__, `SQLITE_DBSTATUS_STMT_USED <https://sqlite.org/c3ref/c_dbstatus_options.html#sqlitedbstatusstmtused>`__, `SQLITE_DBSTATUS_TEMPBUF_SPILL <https://sqlite.org/c3ref/c_dbstatus_options.html>`__

.. data:: mapping_device_characteristics
    :type: dict[str | int, int | str]

    `Device Characteristics <https://sqlite.org/c3ref/c_iocap_atomic.html>`__ constants

    `SQLITE_IOCAP_ATOMIC <https://sqlite.org/c3ref/c_iocap_atomic.html>`__, `SQLITE_IOCAP_ATOMIC16K <https://sqlite.org/c3ref/c_iocap_atomic.html>`__, `SQLITE_IOCAP_ATOMIC1K <https://sqlite.org/c3ref/c_iocap_atomic.html>`__, `SQLITE_IOCAP_ATOMIC2K <https://sqlite.org/c3ref/c_iocap_atomic.html>`__, `SQLITE_IOCAP_ATOMIC32K <https://sqlite.org/c3ref/c_iocap_atomic.html>`__, `SQLITE_IOCAP_ATOMIC4K <https://sqlite.org/c3ref/c_iocap_atomic.html>`__, `SQLITE_IOCAP_ATOMIC512 <https://sqlite.org/c3ref/c_iocap_atomic.html>`__, `SQLITE_IOCAP_ATOMIC64K <https://sqlite.org/c3ref/c_iocap_atomic.html>`__, `SQLITE_IOCAP_ATOMIC8K <https://sqlite.org/c3ref/c_iocap_atomic.html>`__, `SQLITE_IOCAP_BATCH_ATOMIC <https://sqlite.org/c3ref/c_iocap_atomic.html>`__, `SQLITE_IOCAP_IMMUTABLE <https://sqlite.org/c3ref/c_iocap_atomic.html>`__, `SQLITE_IOCAP_POWERSAFE_OVERWRITE <https://sqlite.org/c3ref/c_iocap_atomic.html>`__, `SQLITE_IOCAP_SAFE_APPEND <https://sqlite.org/c3ref/c_iocap_atomic.html>`__, `SQLITE_IOCAP_SEQUENTIAL <https://sqlite.org/c3ref/c_iocap_atomic.html>`__, `SQLITE_IOCAP_SUBPAGE_READ <https://sqlite.org/c3ref/c_iocap_atomic.html>`__, `SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN <https://sqlite.org/c3ref/c_iocap_atomic.html>`__

.. data:: mapping_extended_result_codes
    :type: dict[str | int, int | str]

    `Extended Result Codes <https://sqlite.org/rescode.html>`__ constants

    `SQLITE_ABORT_ROLLBACK <https://sqlite.org/rescode.html#abort_rollback>`__, `SQLITE_AUTH_USER <https://sqlite.org/rescode.html#auth_user>`__, `SQLITE_BUSY_RECOVERY <https://sqlite.org/rescode.html#busy_recovery>`__, `SQLITE_BUSY_SNAPSHOT <https://sqlite.org/rescode.html#busy_snapshot>`__, `SQLITE_BUSY_TIMEOUT <https://sqlite.org/rescode.html#busy_timeout>`__, `SQLITE_CANTOPEN_CONVPATH <https://sqlite.org/rescode.html#cantopen_convpath>`__, `SQLITE_CANTOPEN_DIRTYWAL <https://sqlite.org/rescode.html#cantopen_dirtywal>`__, `SQLITE_CANTOPEN_FULLPATH <https://sqlite.org/rescode.html#cantopen_fullpath>`__, `SQLITE_CANTOPEN_ISDIR <https://sqlite.org/rescode.html#cantopen_isdir>`__, `SQLITE_CANTOPEN_NOTEMPDIR <https://sqlite.org/rescode.html#cantopen_notempdir>`__, `SQLITE_CANTOPEN_SYMLINK <https://sqlite.org/rescode.html#cantopen_symlink>`__, `SQLITE_CONSTRAINT_CHECK <https://sqlite.org/rescode.html#constraint_check>`__, `SQLITE_CONSTRAINT_COMMITHOOK <https://sqlite.org/rescode.html#constraint_commithook>`__, `SQLITE_CONSTRAINT_DATATYPE <https://sqlite.org/rescode.html#constraint_datatype>`__, `SQLITE_CONSTRAINT_FOREIGNKEY <https://sqlite.org/rescode.html#constraint_foreignkey>`__, `SQLITE_CONSTRAINT_FUNCTION <https://sqlite.org/rescode.html#constraint_function>`__, `SQLITE_CONSTRAINT_NOTNULL <https://sqlite.org/rescode.html#constraint_notnull>`__, `SQLITE_CONSTRAINT_PINNED <https://sqlite.org/rescode.html#constraint_pinned>`__, `SQLITE_CONSTRAINT_PRIMARYKEY <https://sqlite.org/rescode.html#constraint_primarykey>`__, `SQLITE_CONSTRAINT_ROWID <https://sqlite.org/rescode.html#constraint_rowid>`__, `SQLITE_CONSTRAINT_TRIGGER <https://sqlite.org/rescode.html#constraint_trigger>`__, `SQLITE_CONSTRAINT_UNIQUE <https://sqlite.org/rescode.html#constraint_unique>`__, `SQLITE_CONSTRAINT_VTAB <https://sqlite.org/rescode.html#constraint_vtab>`__, `SQLITE_CORRUPT_INDEX <https://sqlite.org/rescode.html#corrupt_index>`__, `SQLITE_CORRUPT_SEQUENCE <https://sqlite.org/rescode.html#corrupt_sequence>`__, `SQLITE_CORRUPT_VTAB <https://sqlite.org/rescode.html#corrupt_vtab>`__, `SQLITE_ERROR_KEY <https://sqlite.org/c3ref/c_abort_rollback.html>`__, `SQLITE_ERROR_MISSING_COLLSEQ <https://sqlite.org/rescode.html#error_missing_collseq>`__, `SQLITE_ERROR_RESERVESIZE <https://sqlite.org/c3ref/c_abort_rollback.html>`__, `SQLITE_ERROR_RETRY <https://sqlite.org/rescode.html#error_retry>`__, `SQLITE_ERROR_SNAPSHOT <https://sqlite.org/rescode.html#error_snapshot>`__, `SQLITE_ERROR_UNABLE <https://sqlite.org/c3ref/c_abort_rollback.html>`__, `SQLITE_IOERR_ACCESS <https://sqlite.org/rescode.html#ioerr_access>`__, `SQLITE_IOERR_AUTH <https://sqlite.org/rescode.html#ioerr_auth>`__, `SQLITE_IOERR_BADKEY <https://sqlite.org/c3ref/c_abort_rollback.html>`__, `SQLITE_IOERR_BEGIN_ATOMIC <https://sqlite.org/rescode.html#ioerr_begin_atomic>`__, `SQLITE_IOERR_BLOCKED <https://sqlite.org/rescode.html#ioerr_blocked>`__, `SQLITE_IOERR_CHECKRESERVEDLOCK <https://sqlite.org/rescode.html#ioerr_checkreservedlock>`__, `SQLITE_IOERR_CLOSE <https://sqlite.org/rescode.html#ioerr_close>`__, `SQLITE_IOERR_CODEC <https://sqlite.org/c3ref/c_abort_rollback.html>`__, `SQLITE_IOERR_COMMIT_ATOMIC <https://sqlite.org/rescode.html#ioerr_commit_atomic>`__, `SQLITE_IOERR_CONVPATH <https://sqlite.org/rescode.html#ioerr_convpath>`__, `SQLITE_IOERR_CORRUPTFS <https://sqlite.org/rescode.html#ioerr_corruptfs>`__, `SQLITE_IOERR_DATA <https://sqlite.org/rescode.html#ioerr_data>`__, `SQLITE_IOERR_DELETE <https://sqlite.org/rescode.html#ioerr_delete>`__, `SQLITE_IOERR_DELETE_NOENT <https://sqlite.org/rescode.html#ioerr_delete_noent>`__, `SQLITE_IOERR_DIR_CLOSE <https://sqlite.org/rescode.html#ioerr_dir_close>`__, `SQLITE_IOERR_DIR_FSYNC <https://sqlite.org/rescode.html#ioerr_dir_fsync>`__, `SQLITE_IOERR_FSTAT <https://sqlite.org/rescode.html#ioerr_fstat>`__, `SQLITE_IOERR_FSYNC <https://sqlite.org/rescode.html#ioerr_fsync>`__, `SQLITE_IOERR_GETTEMPPATH <https://sqlite.org/rescode.html#ioerr_gettemppath>`__, `SQLITE_IOERR_IN_PAGE <https://sqlite.org/c3ref/c_abort_rollback.html>`__, `SQLITE_IOERR_LOCK <https://sqlite.org/rescode.html#ioerr_lock>`__, `SQLITE_IOERR_MMAP <https://sqlite.org/rescode.html#ioerr_mmap>`__, `SQLITE_IOERR_NOMEM <https://sqlite.org/rescode.html#ioerr_nomem>`__, `SQLITE_IOERR_RDLOCK <https://sqlite.org/rescode.html#ioerr_rdlock>`__, `SQLITE_IOERR_READ <https://sqlite.org/rescode.html#ioerr_read>`__, `SQLITE_IOERR_ROLLBACK_ATOMIC <https://sqlite.org/rescode.html#ioerr_rollback_atomic>`__, `SQLITE_IOERR_SEEK <https://sqlite.org/rescode.html#ioerr_seek>`__, `SQLITE_IOERR_SHMLOCK <https://sqlite.org/rescode.html#ioerr_shmlock>`__, `SQLITE_IOERR_SHMMAP <https://sqlite.org/rescode.html#ioerr_shmmap>`__, `SQLITE_IOERR_SHMOPEN <https://sqlite.org/rescode.html#ioerr_shmopen>`__, `SQLITE_IOERR_SHMSIZE <https://sqlite.org/rescode.html#ioerr_shmsize>`__, `SQLITE_IOERR_SHORT_READ <https://sqlite.org/rescode.html#ioerr_short_read>`__, `SQLITE_IOERR_TRUNCATE <https://sqlite.org/rescode.html#ioerr_truncate>`__, `SQLITE_IOERR_UNLOCK <https://sqlite.org/rescode.html#ioerr_unlock>`__, `SQLITE_IOERR_VNODE <https://sqlite.org/rescode.html#ioerr_vnode>`__, `SQLITE_IOERR_WRITE <https://sqlite.org/rescode.html#ioerr_write>`__, `SQLITE_LOCKED_SHAREDCACHE <https://sqlite.org/rescode.html#locked_sharedcache>`__, `SQLITE_LOCKED_VTAB <https://sqlite.org/rescode.html#locked_vtab>`__, `SQLITE_NOTICE_RBU <https://sqlite.org/c3ref/c_abort_rollback.html>`__, `SQLITE_NOTICE_RECOVER_ROLLBACK <https://sqlite.org/rescode.html#notice_recover_rollback>`__, `SQLITE_NOTICE_RECOVER_WAL <https://sqlite.org/rescode.html#notice_recover_wal>`__, `SQLITE_OK_LOAD_PERMANENTLY <https://sqlite.org/rescode.html#ok_load_permanently>`__, `SQLITE_OK_SYMLINK <https://sqlite.org/c3ref/c_abort_rollback.html>`__, `SQLITE_READONLY_CANTINIT <https://sqlite.org/rescode.html#readonly_cantinit>`__, `SQLITE_READONLY_CANTLOCK <https://sqlite.org/rescode.html#readonly_cantlock>`__, `SQLITE_READONLY_DBMOVED <https://sqlite.org/rescode.html#readonly_dbmoved>`__, `SQLITE_READONLY_DIRECTORY <https://sqlite.org/rescode.html#readonly_directory>`__, `SQLITE_READONLY_RECOVERY <https://sqlite.org/rescode.html#readonly_recovery>`__, `SQLITE_READONLY_ROLLBACK <https://sqlite.org/rescode.html#readonly_rollback>`__, `SQLITE_WARNING_AUTOINDEX <https://sqlite.org/rescode.html#warning_autoindex>`__

.. data:: mapping_file_control
    :type: dict[str | int, int | str]

    `Standard File Control Opcodes <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html>`__ constants

    `SQLITE_FCNTL_BEGIN_ATOMIC_WRITE <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlbeginatomicwrite>`__, `SQLITE_FCNTL_BLOCK_ON_CONNECT <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlblockonconnect>`__, `SQLITE_FCNTL_BUSYHANDLER <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlbusyhandler>`__, `SQLITE_FCNTL_CHUNK_SIZE <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlchunksize>`__, `SQLITE_FCNTL_CKPT_DONE <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlckptdone>`__, `SQLITE_FCNTL_CKPT_START <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlckptstart>`__, `SQLITE_FCNTL_CKSM_FILE <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlcksmfile>`__, `SQLITE_FCNTL_COMMIT_ATOMIC_WRITE <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlcommitatomicwrite>`__, `SQLITE_FCNTL_COMMIT_PHASETWO <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlcommitphasetwo>`__, `SQLITE_FCNTL_DATA_VERSION <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntldataversion>`__, `SQLITE_FCNTL_EXTERNAL_READER <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlexternalreader>`__, `SQLITE_FCNTL_FILESTAT <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlfilestat>`__, `SQLITE_FCNTL_FILE_POINTER <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlfilepointer>`__, `SQLITE_FCNTL_GET_LOCKPROXYFILE <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html>`__, `SQLITE_FCNTL_HAS_MOVED <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlhasmoved>`__, `SQLITE_FCNTL_JOURNAL_POINTER <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntljournalpointer>`__, `SQLITE_FCNTL_LAST_ERRNO <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html>`__, `SQLITE_FCNTL_LOCKSTATE <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntllockstate>`__, `SQLITE_FCNTL_LOCK_TIMEOUT <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntllocktimeout>`__, `SQLITE_FCNTL_MMAP_SIZE <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlmmapsize>`__, `SQLITE_FCNTL_NULL_IO <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlnullio>`__, `SQLITE_FCNTL_OVERWRITE <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntloverwrite>`__, `SQLITE_FCNTL_PDB <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html>`__, `SQLITE_FCNTL_PERSIST_WAL <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlpersistwal>`__, `SQLITE_FCNTL_POWERSAFE_OVERWRITE <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlpowersafeoverwrite>`__, `SQLITE_FCNTL_PRAGMA <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlpragma>`__, `SQLITE_FCNTL_RBU <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlrbu>`__, `SQLITE_FCNTL_RESERVE_BYTES <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html>`__, `SQLITE_FCNTL_RESET_CACHE <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlresetcache>`__, `SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlrollbackatomicwrite>`__, `SQLITE_FCNTL_SET_LOCKPROXYFILE <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html>`__, `SQLITE_FCNTL_SIZE_HINT <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlsizehint>`__, `SQLITE_FCNTL_SIZE_LIMIT <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlsizelimit>`__, `SQLITE_FCNTL_SYNC <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlsync>`__, `SQLITE_FCNTL_SYNC_OMITTED <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlsyncomitted>`__, `SQLITE_FCNTL_TEMPFILENAME <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntltempfilename>`__, `SQLITE_FCNTL_TRACE <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntltrace>`__, `SQLITE_FCNTL_VFSNAME <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlvfsname>`__, `SQLITE_FCNTL_VFS_POINTER <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlvfspointer>`__, `SQLITE_FCNTL_WAL_BLOCK <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlwalblock>`__, `SQLITE_FCNTL_WIN32_AV_RETRY <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlwin32avretry>`__, `SQLITE_FCNTL_WIN32_GET_HANDLE <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlwin32gethandle>`__, `SQLITE_FCNTL_WIN32_SET_HANDLE <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlwin32sethandle>`__, `SQLITE_FCNTL_ZIPVFS <https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlzipvfs>`__

.. data:: mapping_fts5_token_flags
    :type: dict[str | int, int | str]

    `FTS5 Token Flag <https://sqlite.org/fts5.html#synonym_support>`__ constants

    `FTS5_TOKEN_COLOCATED <https://sqlite.org/fts5.html#synonym_support>`__

.. data:: mapping_fts5_tokenize_reason
    :type: dict[str | int, int | str]

    `FTS5 Tokenize Reason <https://sqlite.org/fts5.html#custom_tokenizers>`__ constants

    `FTS5_TOKENIZE_AUX <https://sqlite.org/fts5.html#custom_tokenizers>`__, `FTS5_TOKENIZE_DOCUMENT <https://sqlite.org/fts5.html#custom_tokenizers>`__, `FTS5_TOKENIZE_PREFIX <https://sqlite.org/fts5.html#custom_tokenizers>`__, `FTS5_TOKENIZE_QUERY <https://sqlite.org/fts5.html#custom_tokenizers>`__

.. data:: mapping_function_flags
    :type: dict[str | int, int | str]

    `Function Flags <https://sqlite.org/c3ref/c_deterministic.html>`__ constants

    `SQLITE_DETERMINISTIC <https://sqlite.org/c3ref/c_deterministic.html#sqlitedeterministic>`__, `SQLITE_DIRECTONLY <https://sqlite.org/c3ref/c_deterministic.html#sqlitedirectonly>`__, `SQLITE_INNOCUOUS <https://sqlite.org/c3ref/c_deterministic.html#sqliteinnocuous>`__, `SQLITE_RESULT_SUBTYPE <https://sqlite.org/c3ref/c_deterministic.html#sqliteresultsubtype>`__, `SQLITE_SELFORDER1 <https://sqlite.org/c3ref/c_deterministic.html#sqliteselforder1>`__, `SQLITE_SUBTYPE <https://sqlite.org/c3ref/c_deterministic.html#sqlitesubtype>`__

.. data:: mapping_limits
    :type: dict[str | int, int | str]

    `Run-Time Limit Categories <https://sqlite.org/c3ref/c_limit_attached.html>`__ constants

    `SQLITE_LIMIT_ATTACHED <https://sqlite.org/c3ref/c_limit_attached.html#sqlitelimitattached>`__, `SQLITE_LIMIT_COLUMN <https://sqlite.org/c3ref/c_limit_attached.html#sqlitelimitcolumn>`__, `SQLITE_LIMIT_COMPOUND_SELECT <https://sqlite.org/c3ref/c_limit_attached.html#sqlitelimitcompoundselect>`__, `SQLITE_LIMIT_EXPR_DEPTH <https://sqlite.org/c3ref/c_limit_attached.html#sqlitelimitexprdepth>`__, `SQLITE_LIMIT_FUNCTION_ARG <https://sqlite.org/c3ref/c_limit_attached.html#sqlitelimitfunctionarg>`__, `SQLITE_LIMIT_LENGTH <https://sqlite.org/c3ref/c_limit_attached.html#sqlitelimitlength>`__, `SQLITE_LIMIT_LIKE_PATTERN_LENGTH <https://sqlite.org/c3ref/c_limit_attached.html#sqlitelimitlikepatternlength>`__, `SQLITE_LIMIT_PARSER_DEPTH <https://sqlite.org/c3ref/c_limit_attached.html#sqlitelimitparserdepth>`__, `SQLITE_LIMIT_SQL_LENGTH <https://sqlite.org/c3ref/c_limit_attached.html#sqlitelimitsqllength>`__, `SQLITE_LIMIT_TRIGGER_DEPTH <https://sqlite.org/c3ref/c_limit_attached.html#sqlitelimittriggerdepth>`__, `SQLITE_LIMIT_VARIABLE_NUMBER <https://sqlite.org/c3ref/c_limit_attached.html#sqlitelimitvariablenumber>`__, `SQLITE_LIMIT_VDBE_OP <https://sqlite.org/c3ref/c_limit_attached.html#sqlitelimitvdbeop>`__, `SQLITE_LIMIT_WORKER_THREADS <https://sqlite.org/c3ref/c_limit_attached.html#sqlitelimitworkerthreads>`__

.. data:: mapping_locking_level
    :type: dict[str | int, int | str]

    `File Locking Levels <https://sqlite.org/c3ref/c_lock_exclusive.html>`__ constants

    `SQLITE_LOCK_EXCLUSIVE <https://sqlite.org/c3ref/c_lock_exclusive.html>`__, `SQLITE_LOCK_NONE <https://sqlite.org/c3ref/c_lock_exclusive.html>`__, `SQLITE_LOCK_PENDING <https://sqlite.org/c3ref/c_lock_exclusive.html>`__, `SQLITE_LOCK_RESERVED <https://sqlite.org/c3ref/c_lock_exclusive.html>`__, `SQLITE_LOCK_SHARED <https://sqlite.org/c3ref/c_lock_exclusive.html>`__

.. data:: mapping_open_flags
    :type: dict[str | int, int | str]

    `Flags For File Open Operations <https://sqlite.org/c3ref/c_open_autoproxy.html>`__ constants

    `SQLITE_OPEN_AUTOPROXY <https://sqlite.org/c3ref/c_open_autoproxy.html>`__, `SQLITE_OPEN_CREATE <https://sqlite.org/c3ref/c_open_autoproxy.html>`__, `SQLITE_OPEN_DELETEONCLOSE <https://sqlite.org/c3ref/c_open_autoproxy.html>`__, `SQLITE_OPEN_EXCLUSIVE <https://sqlite.org/c3ref/c_open_autoproxy.html>`__, `SQLITE_OPEN_EXRESCODE <https://sqlite.org/c3ref/c_open_autoproxy.html>`__, `SQLITE_OPEN_FULLMUTEX <https://sqlite.org/c3ref/c_open_autoproxy.html>`__, `SQLITE_OPEN_MAIN_DB <https://sqlite.org/c3ref/c_open_autoproxy.html>`__, `SQLITE_OPEN_MAIN_JOURNAL <https://sqlite.org/c3ref/c_open_autoproxy.html>`__, `SQLITE_OPEN_MEMORY <https://sqlite.org/c3ref/c_open_autoproxy.html>`__, `SQLITE_OPEN_NOFOLLOW <https://sqlite.org/c3ref/c_open_autoproxy.html>`__, `SQLITE_OPEN_NOMUTEX <https://sqlite.org/c3ref/c_open_autoproxy.html>`__, `SQLITE_OPEN_PRIVATECACHE <https://sqlite.org/c3ref/c_open_autoproxy.html>`__, `SQLITE_OPEN_READONLY <https://sqlite.org/c3ref/c_open_autoproxy.html>`__, `SQLITE_OPEN_READWRITE <https://sqlite.org/c3ref/c_open_autoproxy.html>`__, `SQLITE_OPEN_SHAREDCACHE <https://sqlite.org/c3ref/c_open_autoproxy.html>`__, `SQLITE_OPEN_SUBJOURNAL <https://sqlite.org/c3ref/c_open_autoproxy.html>`__, `SQLITE_OPEN_SUPER_JOURNAL <https://sqlite.org/c3ref/c_open_autoproxy.html>`__, `SQLITE_OPEN_TEMP_DB <https://sqlite.org/c3ref/c_open_autoproxy.html>`__, `SQLITE_OPEN_TEMP_JOURNAL <https://sqlite.org/c3ref/c_open_autoproxy.html>`__, `SQLITE_OPEN_TRANSIENT_DB <https://sqlite.org/c3ref/c_open_autoproxy.html>`__, `SQLITE_OPEN_URI <https://sqlite.org/c3ref/c_open_autoproxy.html>`__, `SQLITE_OPEN_WAL <https://sqlite.org/c3ref/c_open_autoproxy.html>`__

.. data:: mapping_prepare_flags
    :type: dict[str | int, int | str]

    `Prepare Flags <https://sqlite.org/c3ref/c_prepare_dont_log.html>`__ constants

    `SQLITE_PREPARE_DONT_LOG <https://sqlite.org/c3ref/c_prepare_dont_log.html#sqlitepreparedontlog>`__, `SQLITE_PREPARE_FROM_DDL <https://sqlite.org/c3ref/c_prepare_dont_log.html#sqlitepreparefromddl>`__, `SQLITE_PREPARE_NORMALIZE <https://sqlite.org/c3ref/c_prepare_dont_log.html#sqlitepreparenormalize>`__, `SQLITE_PREPARE_NO_VTAB <https://sqlite.org/c3ref/c_prepare_dont_log.html#sqlitepreparenovtab>`__, `SQLITE_PREPARE_PERSISTENT <https://sqlite.org/c3ref/c_prepare_dont_log.html#sqlitepreparepersistent>`__

.. data:: mapping_result_codes
    :type: dict[str | int, int | str]

    `Result Codes <https://sqlite.org/rescode.html>`__ constants

    `SQLITE_ABORT <https://sqlite.org/c3ref/c_fail.html>`__, `SQLITE_AUTH <https://sqlite.org/rescode.html#auth>`__, `SQLITE_BUSY <https://sqlite.org/rescode.html#busy>`__, `SQLITE_CANTOPEN <https://sqlite.org/rescode.html#cantopen>`__, `SQLITE_CONSTRAINT <https://sqlite.org/rescode.html#constraint>`__, `SQLITE_CORRUPT <https://sqlite.org/rescode.html#corrupt>`__, `SQLITE_DONE <https://sqlite.org/rescode.html#done>`__, `SQLITE_EMPTY <https://sqlite.org/rescode.html#empty>`__, `SQLITE_ERROR <https://sqlite.org/rescode.html#error>`__, `SQLITE_FORMAT <https://sqlite.org/rescode.html#format>`__, `SQLITE_FULL <https://sqlite.org/rescode.html#full>`__, `SQLITE_INTERNAL <https://sqlite.org/rescode.html#internal>`__, `SQLITE_INTERRUPT <https://sqlite.org/rescode.html#interrupt>`__, `SQLITE_IOERR <https://sqlite.org/rescode.html#ioerr>`__, `SQLITE_LOCKED <https://sqlite.org/rescode.html#locked>`__, `SQLITE_MISMATCH <https://sqlite.org/rescode.html#mismatch>`__, `SQLITE_MISUSE <https://sqlite.org/rescode.html#misuse>`__, `SQLITE_NOLFS <https://sqlite.org/rescode.html#nolfs>`__, `SQLITE_NOMEM <https://sqlite.org/rescode.html#nomem>`__, `SQLITE_NOTADB <https://sqlite.org/rescode.html#notadb>`__, `SQLITE_NOTFOUND <https://sqlite.org/rescode.html#notfound>`__, `SQLITE_NOTICE <https://sqlite.org/rescode.html#notice>`__, `SQLITE_OK <https://sqlite.org/c3ref/c_deny.html>`__, `SQLITE_PERM <https://sqlite.org/rescode.html#perm>`__, `SQLITE_PROTOCOL <https://sqlite.org/rescode.html#protocol>`__, `SQLITE_RANGE <https://sqlite.org/rescode.html#range>`__, `SQLITE_READONLY <https://sqlite.org/rescode.html#readonly>`__, `SQLITE_ROW <https://sqlite.org/rescode.html#row>`__, `SQLITE_SCHEMA <https://sqlite.org/rescode.html#schema>`__, `SQLITE_TOOBIG <https://sqlite.org/rescode.html#toobig>`__, `SQLITE_WARNING <https://sqlite.org/rescode.html#warning>`__

.. data:: mapping_session_changeset_apply_v2_flags
    :type: dict[str | int, int | str]

    `Flags for sqlite3changeset_apply_v2 <https://sqlite.org/session/c_changesetapply_fknoaction.html>`__ constants

    (Only present when :doc:`session extension <session>` is enabled)

    `SQLITE_CHANGESETAPPLY_FKNOACTION <https://sqlite.org/session/c_changesetapply_fknoaction.html>`__, `SQLITE_CHANGESETAPPLY_IGNORENOOP <https://sqlite.org/session/c_changesetapply_fknoaction.html>`__, `SQLITE_CHANGESETAPPLY_INVERT <https://sqlite.org/session/c_changesetapply_fknoaction.html>`__, `SQLITE_CHANGESETAPPLY_NOSAVEPOINT <https://sqlite.org/session/c_changesetapply_fknoaction.html>`__

.. data:: mapping_session_changeset_start_v2_flags
    :type: dict[str | int, int | str]

    `Flags for sqlite3changeset_start_v2 <https://sqlite.org/session/c_changesetstart_invert.html>`__ constants

    (Only present when :doc:`session extension <session>` is enabled)

    `SQLITE_CHANGESETSTART_INVERT <https://sqlite.org/session/c_changesetstart_invert.html>`__

.. data:: mapping_session_config_options
    :type: dict[str | int, int | str]

    `Values for sqlite3session_config <https://sqlite.org/session/c_session_config_strmsize.html>`__ constants

    (Only present when :doc:`session extension <session>` is enabled)

    `SQLITE_SESSION_CONFIG_STRMSIZE <https://sqlite.org/session/c_session_config_strmsize.html>`__

.. data:: mapping_session_conflict
    :type: dict[str | int, int | str]

    `Constants Passed To The Conflict Handler <https://sqlite.org/session/c_changeset_conflict.html>`__ constants

    (Only present when :doc:`session extension <session>` is enabled)

    `SQLITE_CHANGESET_CONFLICT <https://sqlite.org/session/c_changeset_conflict.html>`__, `SQLITE_CHANGESET_CONSTRAINT <https://sqlite.org/session/c_changeset_conflict.html>`__, `SQLITE_CHANGESET_DATA <https://sqlite.org/session/c_changeset_conflict.html>`__, `SQLITE_CHANGESET_FOREIGN_KEY <https://sqlite.org/session/c_changeset_conflict.html>`__, `SQLITE_CHANGESET_NOTFOUND <https://sqlite.org/session/c_changeset_conflict.html>`__

.. data:: mapping_session_conflict_response
    :type: dict[str | int, int | str]

    `Constants Returned By The Conflict Handler <https://sqlite.org/session/c_changeset_abort.html>`__ constants

    (Only present when :doc:`session extension <session>` is enabled)

    `SQLITE_CHANGESET_ABORT <https://sqlite.org/session/c_changeset_abort.html>`__, `SQLITE_CHANGESET_OMIT <https://sqlite.org/session/c_changeset_abort.html>`__, `SQLITE_CHANGESET_REPLACE <https://sqlite.org/session/c_changeset_abort.html>`__

.. data:: mapping_session_object_config_options
    :type: dict[str | int, int | str]

    `Options for sqlite3session_object_config <https://sqlite.org/session/c_session_objconfig_rowid.html>`__ constants

    (Only present when :doc:`session extension <session>` is enabled)

    `SQLITE_SESSION_OBJCONFIG_ROWID <https://sqlite.org/session/c_session_objconfig_rowid.html>`__, `SQLITE_SESSION_OBJCONFIG_SIZE <https://sqlite.org/session/c_session_objconfig_rowid.html>`__

.. data:: mapping_setlk_timeout_flags
    :type: dict[str | int, int | str]

    `Flags for sqlite3_setlk_timeout() <https://sqlite.org/c3ref/c_setlk_block_on_connect.html>`__ constants

    `SQLITE_SETLK_BLOCK_ON_CONNECT <https://sqlite.org/c3ref/c_setlk_block_on_connect.html>`__

.. data:: mapping_statement_status
    :type: dict[str | int, int | str]

    `Status Parameters for prepared statements <https://sqlite.org/c3ref/c_stmtstatus_counter.html>`__ constants

    `SQLITE_STMTSTATUS_AUTOINDEX <https://sqlite.org/c3ref/c_stmtstatus_counter.html#sqlitestmtstatusautoindex>`__, `SQLITE_STMTSTATUS_FILTER_HIT <https://sqlite.org/c3ref/c_stmtstatus_counter.html>`__, `SQLITE_STMTSTATUS_FILTER_MISS <https://sqlite.org/c3ref/c_stmtstatus_counter.html#sqlitestmtstatusfiltermiss>`__, `SQLITE_STMTSTATUS_FULLSCAN_STEP <https://sqlite.org/c3ref/c_stmtstatus_counter.html#sqlitestmtstatusfullscanstep>`__, `SQLITE_STMTSTATUS_MEMUSED <https://sqlite.org/c3ref/c_stmtstatus_counter.html#sqlitestmtstatusmemused>`__, `SQLITE_STMTSTATUS_REPREPARE <https://sqlite.org/c3ref/c_stmtstatus_counter.html#sqlitestmtstatusreprepare>`__, `SQLITE_STMTSTATUS_RUN <https://sqlite.org/c3ref/c_stmtstatus_counter.html#sqlitestmtstatusrun>`__, `SQLITE_STMTSTATUS_SORT <https://sqlite.org/c3ref/c_stmtstatus_counter.html#sqlitestmtstatussort>`__, `SQLITE_STMTSTATUS_VM_STEP <https://sqlite.org/c3ref/c_stmtstatus_counter.html#sqlitestmtstatusvmstep>`__

.. data:: mapping_status
    :type: dict[str | int, int | str]

    `Status Parameters <https://sqlite.org/c3ref/c_status_malloc_count.html>`__ constants

    `SQLITE_STATUS_MALLOC_COUNT <https://sqlite.org/c3ref/c_status_malloc_count.html#sqlitestatusmalloccount>`__, `SQLITE_STATUS_MALLOC_SIZE <https://sqlite.org/c3ref/c_status_malloc_count.html#sqlitestatusmallocsize>`__, `SQLITE_STATUS_MEMORY_USED <https://sqlite.org/c3ref/c_status_malloc_count.html#sqlitestatusmemoryused>`__, `SQLITE_STATUS_PAGECACHE_OVERFLOW <https://sqlite.org/c3ref/c_status_malloc_count.html#sqlitestatuspagecacheoverflow>`__, `SQLITE_STATUS_PAGECACHE_SIZE <https://sqlite.org/c3ref/c_status_malloc_count.html#sqlitestatuspagecachesize>`__, `SQLITE_STATUS_PAGECACHE_USED <https://sqlite.org/c3ref/c_status_malloc_count.html#sqlitestatuspagecacheused>`__, `SQLITE_STATUS_PARSER_STACK <https://sqlite.org/c3ref/c_status_malloc_count.html#sqlitestatusparserstack>`__, `SQLITE_STATUS_SCRATCH_OVERFLOW <https://sqlite.org/c3ref/c_status_malloc_count.html#sqlitestatusscratchoverflow>`__, `SQLITE_STATUS_SCRATCH_SIZE <https://sqlite.org/c3ref/c_status_malloc_count.html#sqlitestatusscratchsize>`__, `SQLITE_STATUS_SCRATCH_USED <https://sqlite.org/c3ref/c_status_malloc_count.html#sqlitestatusscratchused>`__

.. data:: mapping_sync
    :type: dict[str | int, int | str]

    `Synchronization Type Flags <https://sqlite.org/c3ref/c_sync_dataonly.html>`__ constants

    `SQLITE_SYNC_DATAONLY <https://sqlite.org/c3ref/c_sync_dataonly.html>`__, `SQLITE_SYNC_FULL <https://sqlite.org/c3ref/c_sync_dataonly.html>`__, `SQLITE_SYNC_NORMAL <https://sqlite.org/c3ref/c_sync_dataonly.html>`__

.. data:: mapping_trace_codes
    :type: dict[str | int, int | str]

    `SQL Trace Event Codes <https://sqlite.org/c3ref/c_trace.html>`__ constants

    `SQLITE_TRACE_CLOSE <https://sqlite.org/c3ref/c_trace.html#sqlitetraceclose>`__, `SQLITE_TRACE_PROFILE <https://sqlite.org/c3ref/c_trace.html#sqlitetraceprofile>`__, `SQLITE_TRACE_ROW <https://sqlite.org/c3ref/c_trace.html#sqlitetracerow>`__, `SQLITE_TRACE_STMT <https://sqlite.org/c3ref/c_trace.html#sqlitetracestmt>`__

.. data:: mapping_txn_state
    :type: dict[str | int, int | str]

    `Allowed return values from sqlite3_txn_state() <https://sqlite.org/c3ref/c_txn_none.html>`__ constants

    `SQLITE_TXN_NONE <https://sqlite.org/c3ref/c_txn_none.html#sqlitetxnnone>`__, `SQLITE_TXN_READ <https://sqlite.org/c3ref/c_txn_none.html#sqlitetxnread>`__, `SQLITE_TXN_WRITE <https://sqlite.org/c3ref/c_txn_none.html#sqlitetxnwrite>`__

.. data:: mapping_virtual_table_configuration_options
    :type: dict[str | int, int | str]

    `Virtual Table Configuration Options <https://sqlite.org/c3ref/c_vtab_constraint_support.html>`__ constants

    `SQLITE_VTAB_CONSTRAINT_SUPPORT <https://sqlite.org/c3ref/c_vtab_constraint_support.html#sqlitevtabconstraintsupport>`__, `SQLITE_VTAB_DIRECTONLY <https://sqlite.org/c3ref/c_vtab_constraint_support.html#sqlitevtabdirectonly>`__, `SQLITE_VTAB_INNOCUOUS <https://sqlite.org/c3ref/c_vtab_constraint_support.html#sqlitevtabinnocuous>`__, `SQLITE_VTAB_USES_ALL_SCHEMAS <https://sqlite.org/c3ref/c_vtab_constraint_support.html#sqlitevtabusesallschemas>`__

.. data:: mapping_virtual_table_scan_flags
    :type: dict[str | int, int | str]

    `Virtual Table Scan Flags <https://sqlite.org/c3ref/c_index_scan_hex.html>`__ constants

    `SQLITE_INDEX_SCAN_HEX <https://sqlite.org/c3ref/c_index_scan_hex.html>`__, `SQLITE_INDEX_SCAN_UNIQUE <https://sqlite.org/c3ref/c_index_scan_hex.html>`__

.. data:: mapping_wal_checkpoint
    :type: dict[str | int, int | str]

    `Checkpoint Mode Values <https://sqlite.org/c3ref/c_checkpoint_full.html>`__ constants

    `SQLITE_CHECKPOINT_FULL <https://sqlite.org/c3ref/c_checkpoint_full.html>`__, `SQLITE_CHECKPOINT_NOOP <https://sqlite.org/c3ref/c_checkpoint_full.html>`__, `SQLITE_CHECKPOINT_PASSIVE <https://sqlite.org/c3ref/c_checkpoint_full.html>`__, `SQLITE_CHECKPOINT_RESTART <https://sqlite.org/c3ref/c_checkpoint_full.html>`__, `SQLITE_CHECKPOINT_TRUNCATE <https://sqlite.org/c3ref/c_checkpoint_full.html>`__

.. data:: mapping_xshmlock_flags
    :type: dict[str | int, int | str]

    `Flags for the xShmLock VFS method <https://sqlite.org/c3ref/c_shm_exclusive.html>`__ constants

    `SQLITE_SHM_EXCLUSIVE <https://sqlite.org/c3ref/c_shm_exclusive.html>`__, `SQLITE_SHM_LOCK <https://sqlite.org/c3ref/c_shm_exclusive.html>`__, `SQLITE_SHM_SHARED <https://sqlite.org/c3ref/c_shm_exclusive.html>`__, `SQLITE_SHM_UNLOCK <https://sqlite.org/c3ref/c_shm_exclusive.html>`__

