SqlConnection.ts overview
Since v1.0.0
Exports Grouped by Category
model
Connection (interface)
Signature
export interface Connection {
readonly execute: (
sql: string,
params: ReadonlyArray<Primitive>,
transformRows: (<A extends object>(row: ReadonlyArray<A>) => ReadonlyArray<A>) | undefined
) => 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>,
transformRows: (<A extends object>(row: ReadonlyArray<A>) => ReadonlyArray<A>) | undefined
) => Stream<any, SqlError>
readonly executeValues: (
sql: string,
params: ReadonlyArray<Primitive>
) => Effect<ReadonlyArray<ReadonlyArray<Primitive>>, SqlError>
readonly executeUnprepared: (
sql: string,
params: ReadonlyArray<Primitive>,
transformRows: (<A extends object>(row: ReadonlyArray<A>) => ReadonlyArray<A>) | undefined
) => Effect<ReadonlyArray<any>, SqlError>
}
Since v1.0.0
Row (type alias)
Signature
type Row = { readonly [column: string]: Primitive }
Since v1.0.0
tag
Connection
Signature
declare const Connection: any
Since v1.0.0
utils
Connection (namespace)
Since v1.0.0
Acquirer (type alias)
Signature
type Acquirer = Effect<Connection, SqlError, Scope>
Since v1.0.0