adbc_driver_sqlite

Low-Level API

Low-level ADBC bindings for the SQLite driver.

class adbc_driver_sqlite.ConnectionOptions(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Connection options specific to the SQLite driver.

LOAD_EXTENSION_ENABLED = 'adbc.sqlite.load_extension.enabled'

Whether to enable (“true”) or disable (“false”) extension loading. Default is disabled.

LOAD_EXTENSION_ENTRYPOINT = 'adbc.sqlite.load_extension.entrypoint'

The path to an extension to load. Set this option after LOAD_EXTENSION_PATH. This will actually load the extension.

LOAD_EXTENSION_PATH = 'adbc.sqlite.load_extension.path'

The path to an extension to load. First set this option, then LOAD_EXTENSION_ENTRYPOINT. The second call will actually load the extension.

class adbc_driver_sqlite.StatementOptions(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Statement options specific to the SQLite driver.

BATCH_ROWS = 'adbc.sqlite.query.batch_rows'

The number of rows per batch. Defaults to 1024.

adbc_driver_sqlite.connect(uri: str | None = None) AdbcDatabase

Create a low level ADBC connection to SQLite.

DBAPI 2.0 API

DBAPI 2.0-compatible facade for the ADBC SQLite driver.

adbc_driver_sqlite.dbapi.connect(uri: str | None = None, **kwargs) AdbcSqliteConnection

Connect to SQLite via ADBC.

class adbc_driver_sqlite.dbapi.AdbcSqliteConnection(db: AdbcDatabase | _SharedDatabase, conn: AdbcConnection, conn_kwargs: Dict[str, str] | None = None, *, autocommit=False)

Bases: Connection

A connection to an SQLite 3 database.

This adds SQLite-specific functionality to the base ADBC-DBAPI bindings in the adbc_driver_manager.dbapi module.

Methods

enable_load_extension(enabled)

Toggle whether extension loading is allowed.

load_extension(path, *[, entrypoint])

Load an extension into the current connection.

enable_load_extension(enabled: bool) None

Toggle whether extension loading is allowed.

Parameters:
enabled

Whether extension loading is allowed or not.

Notes

This is an extension and not part of the DBAPI standard.

load_extension(path: str, *, entrypoint: str | None = None) None

Load an extension into the current connection.

Parameters:
path

The path to the extension to load.

entrypoint

The entrypoint to the extension. If not provided or None, then SQLite will derive its own entrypoint name.

Notes

This is an extension and not part of the DBAPI standard.

See the SQLite documentation for general information on extensions: https://www.sqlite.org/loadext.html