跳转到内容
简体中文

LibSqlSnapshotStoreOptionsType

此内容尚不支持你的语言。

Defined in: src/persistence/snapshot-stores/LibSqlSnapshotStoreOptions.ts:6

Connection options shared by all three libSQL stores.

readonly optional authToken?: string

Defined in: src/persistence/journals/LibSqlClient.ts:61

Turso auth token. Omit for an unauthenticated local sqld.

LibSqlConnection.authToken


readonly optional autoCreateTables?: boolean

Defined in: src/persistence/snapshot-stores/LibSqlSnapshotStoreOptions.ts:12

Run CREATE TABLE IF NOT EXISTS on first use. Default: true.


readonly optional client?: LibSqlClientLike

Defined in: src/persistence/journals/LibSqlClient.ts:68

Pre-built client — bypasses the lazy @libsql/client import entirely. Use to share ONE client across the journal, snapshot and durable-state stores (see registerLibSqlPlugins), to inject a fake in tests, or to supply a client built with options this connection shape does not model.

LibSqlConnection.client


readonly optional keepN?: number

Defined in: src/persistence/snapshot-stores/LibSqlSnapshotStoreOptions.ts:10

How many snapshots to keep per persistence id. Default: 3; <= 0 keeps all.


readonly optional serializer?: Serializer<unknown>

Defined in: src/persistence/storage/StoreSerializerOptions.ts:23

Custom payload serializer. When set, the store writes rows in the self-describing __serialized__ framing (see PayloadCodec) instead of the default tagged JSON; rows of both formats can coexist in one stream, but reading a framed row back requires a serializer with the same id to be configured.

StoreSerializerOptionsBase.serializer


readonly optional snapshotsTable?: string

Defined in: src/persistence/snapshot-stores/LibSqlSnapshotStoreOptions.ts:8

Snapshots table name. Default: snapshots.


readonly optional url?: string

Defined in: src/persistence/journals/LibSqlClient.ts:59

Database URL — libsql://… (Turso), or http(s):// / ws(s):// for a self-hosted sqld. Required unless client is supplied.

LibSqlConnection.url