LibsqlResultinterfaceno test imports itinterface LibsqlResultWhat execute gives.
| Member | Type | What it is |
|---|---|---|
rows | readonly unknown[] |
The port of a libSQL client, which is how Turso (and a libSQL file, and a server of sqld) is reached. It is typed by the shape of the client's execute and transaction, so that this library depends on no client: the client a caller already has is the port. The dialect is SQLite's; the layout, the statements and the revisions are the same as for a file.
import { libsqlPort } from "@intellectual-frontiers/anyfs-sql/libsql";
// const client = createClient({ url: "libsql://fleet-example.turso.io", authToken });
// const port = libsqlPort(client);LibsqlResultinterfaceno test imports itinterface LibsqlResultWhat execute gives.
| Member | Type | What it is |
|---|---|---|
rows | readonly unknown[] |
LibsqlExecutorinterfaceno test imports itinterface LibsqlExecutorWhat runs one statement: a client, or a transaction of one.
| Member | Type | What it is |
|---|---|---|
execute | (statement: { readonly sql: string; readonly args: readonly SqlValue[]; }) => Promise<LibsqlResult> |
LibsqlTransactioninterfaceno test imports itinterface LibsqlTransaction extends LibsqlExecutorA transaction of a libSQL client.
| Member | Type | What it is |
|---|---|---|
commit | () => Promise<void> | |
rollback | () => Promise<void> | |
close | () => void | |
execute | (statement: { readonly sql: string; readonly args: readonly SqlValue[]; }) => Promise<LibsqlResult> |
LibsqlClientinterfaceno test imports itinterface LibsqlClient extends LibsqlExecutorA libSQL client.
| Member | Type | What it is |
|---|---|---|
transaction | (mode?: "deferred" | "read" | "write" | undefined) => Promise<LibsqlTransaction> | |
close | () => void | |
execute | (statement: { readonly sql: string; readonly args: readonly SqlValue[]; }) => Promise<LibsqlResult> |
libsqlPortfunctionno test imports itfunction libsqlPort(client: LibsqlClient): SqlPortThe port of a libSQL client.