SqlClient
Constructors
Models
Signature
declare const SqlClient: Tag<SqlClient, SqlClient>Signature
interface SqlClient extends Constructor { <A extends object = Row>(strings: TemplateStringsArray, ...args: Array<any>): Statement<A>; (value: string): Identifier; readonly [TypeId]: typeof TypeId; readonly reactive: <A, E, R>(keys: readonly Array<unknown> | ReadonlyRecord<string, readonly Array<unknown>>, effect: Effect<A, E, R>) => Stream<A, E, R>; readonly reactiveMailbox: <A, E, R>(keys: readonly Array<unknown> | ReadonlyRecord<string, readonly Array<unknown>>, effect: Effect<A, E, R>) => Effect<ReadonlyMailbox<A, E>, never, Scope | R>; readonly reserve: Effect<Connection, SqlError, Scope>; readonly safe: SqlClient; readonly withoutTransforms: () => this; readonly withTransaction: <R, E, A>(self: Effect<A, E, R>) => Effect<A, SqlError | E, R>;}Other
SafeIntegers
Added in v1.0.0
Source
Signature
declare class SafeIntegers extends any { constructor();}TransactionConnection
Added in v1.0.0
Source
Signature
declare const TransactionConnection: Tag<TransactionConnection, readonly [Connection, number]>TransactionConnection interface
Added in v1.0.0
Source
Signature
interface TransactionConnection { readonly _: typeof _;}Transactions
makeWithTransaction
Added in v1.0.0
Source
Signature
declare const makeWithTransaction: <I, S>(options: { readonly acquireConnection: Effect<readonly [CloseableScope | undefined, S], SqlError>; readonly begin: (conn: NoInfer<S>) => Effect<void, SqlError>; readonly commit: (conn: NoInfer<S>) => Effect<void, SqlError>; readonly rollback: (conn: NoInfer<S>) => Effect<void, SqlError>; readonly rollbackSavepoint: (conn: NoInfer<S>, id: number) => Effect<void, SqlError>; readonly savepoint: (conn: NoInfer<S>, id: number) => Effect<void, SqlError>; readonly spanAttributes: ReadonlyArray<readonly [string, unknown]>; readonly transactionTag: Tag<I, readonly [conn: S, counter: number]>;}) => <R, E, A>(effect: Effect<A, E, R>) => Effect<A, E | SqlError, R>