Skip to content
Effect 4.0 is here. One ecosystem. Zero dependencies.

SqliteClient

8 exports Since v1.0.0 Source

Constructor

Since v1.0.0

Explicit transactions use BEGIN IMMEDIATE, so they hold the write lock for their duration (even when they only read) instead of failing when upgrading a read snapshot under concurrent writers.

Signature

declare function make(options: SqliteClientConfig): Effect<SqliteClient, never, any>

Layers

Since v1.0.0

Signature

declare function layer(config: SqliteClientConfig): Layer<any, ConfigError>

Signature

declare function layerConfig(config: Wrap<SqliteClientConfig>): Layer<any, ConfigError>

Models

SqliteClient

interface
Since v1.0.0

Signature

interface SqliteClient extends unknown {
readonly [TypeId]: typeof TypeId;
readonly config: SqliteClientConfig;
readonly export: Effect<Uint8Array<ArrayBufferLike>, SqlError>;
readonly loadExtension: (path: string) => Effect<void, SqlError>;
readonly updateValues: never;
}
Since v1.0.0

Signature

interface SqliteClientConfig {
readonly create?: boolean;
readonly disableWAL?: boolean;
readonly filename: string;
readonly readonly?: boolean;
readonly readwrite?: boolean;
readonly spanAttributes?: Record<string, unknown>;
readonly transformQueryNames?: (str: string) => string;
readonly transformResultNames?: (str: string) => string;
}

Tags

Signature

declare const SqliteClient: any

Type Ids

Since v1.0.0

Signature

declare const TypeId: unique symbol
Since v1.0.0

Signature

type TypeId = typeof TypeId