Opaque root resource for one local embedded Turso database.
A database is opened once and can derive many independent
Tursox.Connection resources. :memory databases are shared by connections
derived from the same handle; separate opens remain isolated.
Builder features are experimental upstream and opt-in through :features.
Summary
Functions
Builder feature names confirmed on the pinned Turso crate.
Logically closes a database. It is safe to call repeatedly.
Derives an independent connection from this database handle.
Returns safe metadata without exposing the native reference.
Opens a local file or isolated in-memory database.
Types
Functions
@spec builder_features() :: [atom()]
Builder feature names confirmed on the pinned Turso crate.
@spec close(t()) :: :ok
Logically closes a database. It is safe to call repeatedly.
@spec connect( t(), keyword() ) :: {:ok, Tursox.Connection.t()} | {:error, Tursox.Error.t()}
Derives an independent connection from this database handle.
Returns safe metadata without exposing the native reference.
@spec open( :memory | String.t(), keyword() ) :: {:ok, t()} | {:error, Tursox.Error.t()}
Opens a local file or isolated in-memory database.
Supported options are:
:journal_mode—:wal(default) or experimental:mvcc;:features— an opt-in list frombuilder_features/0;:create_parent— create a missing file parent directory (default false);:mode— only:read_write_createis supported by Turso 0.7.2;:busy_timeout— timeout used while applying/verifying open pragmas.