Download .opencode/node_modules/effect/src/unstable/sql/SqlConnection.ts from Chenloong999/opencode-data: direct link, hf CLI and curl.
- Browser
- Download file 1.67 kB
-
https://huggingface.co/datasets/Chenloong999/opencode-data/resolve/84c8581d284a6a73a22921151ea3d89e2bcfe44e/.opencode/node_modules/effect/src/unstable/sql/SqlConnection.ts
- Command line
-
hf download hf://datasets/Chenloong999/opencode-data@84c8581d284a6a73a22921151ea3d89e2bcfe44e/.opencode/node_modules/effect/src/unstable/sql/SqlConnection.ts
-
curl -L -o SqlConnection.ts https://huggingface.co/datasets/Chenloong999/opencode-data/resolve/84c8581d284a6a73a22921151ea3d89e2bcfe44e/.opencode/node_modules/effect/src/unstable/sql/SqlConnection.ts
1.67 kB
| /** | |
| * @since 4.0.0 | |
| */ | |
| import * as Context from "../../Context.ts" | |
| import type { Effect } from "../../Effect.ts" | |
| import type { Scope } from "../../Scope.ts" | |
| import type { Stream } from "../../Stream.ts" | |
| import type { SqlError } from "./SqlError.ts" | |
| /** | |
| * @category model | |
| * @since 4.0.0 | |
| */ | |
| export interface Connection { | |
| readonly execute: ( | |
| sql: string, | |
| params: ReadonlyArray<unknown>, | |
| 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<unknown> | |
| ) => Effect<unknown, SqlError> | |
| readonly executeStream: ( | |
| sql: string, | |
| params: ReadonlyArray<unknown>, | |
| transformRows: (<A extends object>(row: ReadonlyArray<A>) => ReadonlyArray<A>) | undefined | |
| ) => Stream<any, SqlError> | |
| readonly executeValues: ( | |
| sql: string, | |
| params: ReadonlyArray<unknown> | |
| ) => Effect<ReadonlyArray<ReadonlyArray<unknown>>, SqlError> | |
| readonly executeUnprepared: ( | |
| sql: string, | |
| params: ReadonlyArray<unknown>, | |
| transformRows: (<A extends object>(row: ReadonlyArray<A>) => ReadonlyArray<A>) | undefined | |
| ) => Effect<ReadonlyArray<any>, SqlError> | |
| } | |
| /** | |
| * @category model | |
| * @since 4.0.0 | |
| */ | |
| export type Acquirer = Effect<Connection, SqlError, Scope> | |
| /** | |
| * @category tag | |
| * @since 4.0.0 | |
| */ | |
| export const Connection = Context.Service<Connection>("effect/sql/SqlConnection") | |
| /** | |
| * @category model | |
| * @since 4.0.0 | |
| */ | |
| export type Row = { readonly [column: string]: unknown } | |