GitHub

connection

API reference for connection.

What a driver provides: a Connection that runs compiled SQL (Effect's effect/sql/SqlConnection).

A driver builds a client from an Acquirer (an effect leasing a connection into the current scope) and, optionally, a Borrower that lends one for a single statement without a scope.

Re-exports

Types

TypeDefinitionDescription
Rowtype Row = Mapping[str, object]

A result row: column name to value.

TransformRowstype TransformRows = Callable[[Sequence[Row]], Sequence[Row]]

Renames the columns of result rows.

ValueRowtype ValueRow = tuple[object, ...]

A result row as its values, in column order.

Acquirertype Acquirer = Effect[Connection, SqlError, Scope]

Leases a connection until the current scope closes.

Classes