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, SqlError, Scope.Scope | Reactivity.Reactivity>

Added in v1.0.0

makeMemory

Signature

export declare const makeMemory: (
  options: SqliteClientMemoryConfig
) => Effect.Effect<SqliteClient, SqlError, Scope.Scope | Reactivity.Reactivity>

Added in v1.0.0

layers

layer

Signature

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

Added in v1.0.0

layerConfig

Signature

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

Added in v1.0.0

layerMemory

Signature

export declare const layerMemory: (
  config: SqliteClientMemoryConfig
) => Layer.Layer<SqliteClient | Client.SqlClient, ConfigError | SqlError>

Added in v1.0.0

layerMemoryConfig

Signature

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

Added in v1.0.0

models

SqliteClient (interface)

Signature

export interface SqliteClient extends Client.SqlClient {
  readonly [TypeId]: TypeId
  readonly config: SqliteClientMemoryConfig
  readonly reactive: <A, E, R>(
    keys: ReadonlyArray<string> | ReadonlyRecord<string, ReadonlyArray<number>>,
    effect: Effect.Effect<A, E, R>
  ) => Stream.Stream<A, E, R>
  readonly reactiveMailbox: <A, E, R>(
    keys: ReadonlyArray<string> | ReadonlyRecord<string, ReadonlyArray<number>>,
    effect: Effect.Effect<A, E, R>
  ) => Effect.Effect<Mailbox.ReadonlyMailbox<A>, E, R | Scope.Scope>
  readonly export: Effect.Effect<Uint8Array, SqlError>
  readonly import: (data: Uint8Array) => Effect.Effect<void, SqlError>

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

Added in v1.0.0

SqliteClientConfig (interface)

Signature

export interface SqliteClientConfig {
  readonly worker: Effect.Effect<Worker | SharedWorker | MessagePort, never, Scope.Scope>
  readonly installReactivityHooks?: boolean
  readonly spanAttributes?: Record<string, unknown>
  readonly transformResultNames?: (str: string) => string
  readonly transformQueryNames?: (str: string) => string
}

Added in v1.0.0

SqliteClientMemoryConfig (interface)

Signature

export interface SqliteClientMemoryConfig {
  readonly installReactivityHooks?: boolean
  readonly spanAttributes?: Record<string, unknown>
  readonly transformResultNames?: (str: string) => string
  readonly transformQueryNames?: (str: string) => string
}

Added in v1.0.0

tags

SqliteClient

Signature

export declare const SqliteClient: any

Added in v1.0.0

tranferables

currentTransferables

Signature

export declare const currentTransferables: FiberRef.FiberRef<readonly Transferable[]>

Added in v1.0.0

withTransferables

Signature

export declare const withTransferables: (
  transferables: ReadonlyArray<Transferable>
) => <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>

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