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#
- From
pyfect.sql.error:SqlError
Types#
| Type | Definition | Description |
|---|---|---|
Row | type Row = Mapping[str, object] | A result row: column name to value. |
TransformRows | type TransformRows = Callable[[Sequence[Row]], Sequence[Row]] | Renames the columns of result rows. |
ValueRow | type ValueRow = tuple[object, ...] | A result row as its values, in column order. |
Acquirer | type Acquirer = Effect[Connection, SqlError, Scope] | Leases a connection until the current scope closes. |