What the libSQL client runs statements on (@libsql/client's
Client and Transaction, the part Effect's driver uses).
LibsqlSdk and LibsqlSdkTransaction are async: the client awaits
them on pyfect's SQL loop thread (pyfect.sql._loop), so a caller-owned
client (LibsqlLiveConfig) must be usable from that loop. The client
makes its own for a file: / :memory: database (sqlite3) or a
remote server (Hrana over HTTP).
Types#
| Type | Definition | Description |
|---|---|---|
Value | type Value = int | float | str | bytes | None | A value as libSQL stores it. |
TransactionMode | type TransactionMode = Literal['write', 'read', 'deferred'] |
|
SdkProtocol | type SdkProtocol = Literal['http', 'ws', 'file'] | How a client reaches its database ( |
Classes#
Functions#
begin_statement#
begin_statement(mode) -> str| Parameter | Type | Description |
|---|---|---|
mode | TransactionMode |
Returns str
def begin_statement(mode: TransactionMode) -> str:
return _BEGIN[mode]