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

SqlConnection overview

Added in v1.0.0


Table of contents


model

Connection (interface)

Signature

export interface Connection {
  readonly execute: (sql: string, params: ReadonlyArray<Primitive>) => Effect<ReadonlyArray<any>, SqlError>

  /**
   * Execute the specified SQL query and return the raw results directly from
   * underlying SQL client.
   */
  readonly executeRaw: (sql: string, params: ReadonlyArray<Primitive>) => Effect<unknown, SqlError>

  readonly executeStream: (sql: string, params: ReadonlyArray<Primitive>) => Stream<any, SqlError>

  readonly executeWithoutTransform: (
    sql: string,
    params: ReadonlyArray<Primitive>
  ) => Effect<ReadonlyArray<any>, SqlError>

  readonly executeValues: (
    sql: string,
    params: ReadonlyArray<Primitive>
  ) => Effect<ReadonlyArray<ReadonlyArray<Primitive>>, SqlError>

  readonly executeUnprepared: (
    sql: string,
    params?: ReadonlyArray<Primitive> | undefined
  ) => Effect<ReadonlyArray<any>, 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: any

Added in v1.0.0

utils

Connection (namespace)

Added in v1.0.0

Acquirer (type alias)

Signature

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

Added in v1.0.0