/** * @since 1.0.0 */ import * as Context from "effect/Context"; import type { Effect } from "effect/Effect"; import type { Scope } from "effect/Scope"; import type { Stream } from "effect/Stream"; import type { SqlError } from "./SqlError.js"; /** * @category model * @since 1.0.0 */ export interface Connection { readonly execute: (sql: string, params: ReadonlyArray, transformRows: ((row: ReadonlyArray) => ReadonlyArray) | undefined) => Effect, SqlError>; /** * Execute the specified SQL query and return the raw results directly from * underlying SQL client. */ readonly executeRaw: (sql: string, params: ReadonlyArray) => Effect; readonly executeStream: (sql: string, params: ReadonlyArray, transformRows: ((row: ReadonlyArray) => ReadonlyArray) | undefined) => Stream; readonly executeValues: (sql: string, params: ReadonlyArray) => Effect>, SqlError>; readonly executeUnprepared: (sql: string, params: ReadonlyArray, transformRows: ((row: ReadonlyArray) => ReadonlyArray) | undefined) => Effect, SqlError>; } /** * @since 1.0.0 */ export declare namespace Connection { /** * @category model * @since 1.0.0 */ type Acquirer = Effect; } /** * @category tag * @since 1.0.0 */ export declare const Connection: Context.Tag; /** * @category model * @since 1.0.0 */ export type Row = { readonly [column: string]: unknown; }; //# sourceMappingURL=SqlConnection.d.ts.map