Skip to main content Link Search Menu Expand Document (external link)

SqliteClient overview

Added in v1.0.0


Table of contents


constructor

make

Signature

export declare const make: (
  options: SqliteClientConfig
) => Effect.Effect<SqliteClient, never, Scope.Scope | Reactivity.Reactivity>

Added in v1.0.0

layers

layer

Signature

export declare const layer: (config: SqliteClientConfig) => Layer.Layer<SqliteClient | Client.SqlClient, ConfigError>

Added in v1.0.0

layerConfig

Signature

export declare const layerConfig: (
  config: Config.Config.Wrap<SqliteClientConfig>
) => Layer.Layer<SqliteClient | Client.SqlClient, ConfigError>

Added in v1.0.0

models

BackupMetadata (interface)

Signature

export interface BackupMetadata {
  readonly totalPages: number
  readonly remainingPages: number
}

Added in v1.0.0

SqliteClient (interface)

Signature

export interface SqliteClient extends Client.SqlClient {
  readonly [TypeId]: TypeId
  readonly config: SqliteClientConfig
  readonly export: Effect.Effect<Uint8Array, SqlError>
  readonly backup: (destination: string) => Effect.Effect<BackupMetadata, SqlError>
  readonly loadExtension: (path: string) => Effect.Effect<void, SqlError>

  /** Not supported in sqlite */
  readonly updateValues: never
}

Added in v1.0.0

SqliteClientConfig (interface)

Signature

export interface SqliteClientConfig {
  readonly filename: string
  readonly readonly?: boolean | undefined
  readonly prepareCacheSize?: number | undefined
  readonly prepareCacheTTL?: Duration.DurationInput | undefined
  readonly disableWAL?: boolean | undefined
  readonly spanAttributes?: Record<string, unknown> | undefined

  readonly transformResultNames?: ((str: string) => string) | undefined
  readonly transformQueryNames?: ((str: string) => string) | undefined
}

Added in v1.0.0

tags

SqliteClient

Signature

export declare const SqliteClient: any

Added in v1.0.0

type ids

TypeId

Signature

export declare const TypeId: typeof TypeId

Added in v1.0.0

TypeId (type alias)

Signature

export type TypeId = typeof TypeId

Added in v1.0.0