ExArrow.ADBC.Database
(ex_arrow v0.4.0)
View Source
ADBC Database handle: open a database via driver (shared library / env).
Canonical API from adbc.h: Database -> Connection -> Statement -> Arrow stream.
Delegates to the configured implementation (see :adbc_database_impl in application config).
Summary
Types
Functions
@spec close(t()) :: :ok
Closes a database handle.
The underlying NIF resource is freed automatically when all Elixir references
are garbage-collected. Calling close/1 explicitly removes the Elixir
reference held by the struct, allowing the driver to be reclaimed sooner.
Opens a database using the given driver path or options.
:adbc_package— use the supervised adbc-package connection whenconfig :ex_arrow, :adbc_packageis set (e.g.[driver: :sqlite, uri: ":memory:"]). The adbc Database and Connection are started under ExArrow’s supervisor; no native driver is loaded.- String — path to the driver shared library (e.g.
libadbc_driver_sqlite.so). - Keyword list —
driver_path: path, ordriver_name: namewith optionaluri: uri. Withdriver_name, the driver manager looks up the library by name (e.g. env, system paths). Ifuriis provided, it is passed to the driver as the database URI (e.g. SQLiteuri: ":memory:"). Ifuriis omitted, no URI option is set; drivers that require one may fail later at connection open.
Returns {:error, message} if the driver cannot be loaded or the adbc_package backend is not configured.