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.
DANGER: unsafe engine features
:unsafe_features enables pinned Turso paths proven capable of terminating
the entire BEAM with SIGBUS or SIGSEGV. Use them only when process loss is
acceptable. They remain exposed so applications can evaluate cutting-edge
behavior without recompiling Tursox.
Summary
Functions
Experimental open-time features available in the pinned Turso build.
Logically closes a database. It is safe to call repeatedly.
Derives an independent connection from this database handle.
Encryption ciphers compiled into every Tursox build and their raw key sizes.
Returns safe metadata without exposing the native reference.
Opens a local file or isolated in-memory database.
Builder features that may terminate the VM and require explicit acknowledgement.
Types
Functions
@spec builder_features() :: [atom()]
Experimental open-time features available in the pinned Turso build.
@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.
@spec encryption_ciphers() :: %{required(atom()) => pos_integer()}
Encryption ciphers compiled into every Tursox build and their raw key sizes.
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;:unsafe_features— explicit crash-risk opt-ins fromunsafe_builder_features/0;:encryption—[cipher: atom, key: binary]when:encryptionis enabled;: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.
@spec unsafe_builder_features() :: [atom()]
Builder features that may terminate the VM and require explicit acknowledgement.