Connection overview

Added in v1.0.0


Table of contents


model

Connection (interface)

Signature

export interface Connection {
  readonly execute: <A extends object = Row>(statement: Statement<A>) => Effect.Effect<ReadonlyArray<A>, SqlError>

  readonly executeStream: <A extends object = Row>(statement: Statement<A>) => Stream.Stream<A, SqlError>

  readonly executeWithoutTransform: <A extends object = Row>(
    statement: Statement<A>
  ) => Effect.Effect<ReadonlyArray<A>, SqlError>

  readonly executeValues: <A extends object = Row>(
    statement: Statement<A>
  ) => Effect.Effect<ReadonlyArray<ReadonlyArray<Primitive>>, SqlError>

  readonly executeRaw: <A extends object = Row>(
    sql: string,
    params?: ReadonlyArray<Primitive> | undefined
  ) => Effect.Effect<ReadonlyArray<A>, SqlError>
}

Added in v1.0.0

Row (type alias)

Signature

export type Row = { readonly [column: string]: Primitive }

Added in v1.0.0

tag

Connection

Signature

export declare const Connection: Tag<Connection, Connection>

Added in v1.0.0

utils

Connection (namespace)

Added in v1.0.0

Acquirer (type alias)

Signature

export type Acquirer = Effect.Effect<Connection, SqlError, Scope>

Added in v1.0.0