ribs_sql
Purely functional, type-safe SQL query execution and composition.
Provides combinators for building SQL queries, parameter binding, and a Transactor abstraction for executing IO operations against various database backends.
Classes
| Class | Description |
|---|---|
| ConnectionIO<A> | A program that requires a SqlConnection to produce a value of type A. |
| ConnectionRill<A> | A deferred streaming query that produces a Rill that output elements of type A when transacted. |
| Fragment | A composable SQL fragment consisting of a SQL string and its bound parameters. |
| Get<A> | Describes how to read a value of type A from a single column position in a database result Row. |
| ParameterizedQuery<P, A> | A parameterized query template. Binds parameters at call time. |
| Put<A> | Describes how to encode a value of type A into a SQL parameter slot. |
| Query<A> | A SELECT query that reads rows of type A using the given Fragment and Read codec. |
| Read<A> | Describes how to read a value of type A from a database result Row. A Read may consume multiple columns. |
| ReadWrite<A> | A bidirectional codec that can both read and write values of type A. |
| SqlConnection | Abstract interface for a database connection. |
| Strategy | Defines the lifecycle hooks for transaction management. |
| Transactor | Manages the lifecycle of a SqlConnection and provides the ability to run ConnectionIO programs using it. |
| Update<A> | An INSERT, UPDATE, or DELETE statement parameterized by A. |
| Update0 | A no-parameter UPDATE/INSERT/DDL statement. |
| UpdateReturning<A, B> | An INSERT...RETURNING (or similar) statement that writes A parameters and reads back B value(s). |
| Write<A> | Describes how to encode a value of type A into SQL parameter slots. A Write may occupy multiple parameter positions. |
Extensions
Extension Types
| Extension Type | Description |
|---|---|
| Row | Alias type for IList<Object?> used to abstract row types used by different database drivers. |
| StatementParameters | Wrapper type for parameters that can be applied to a statement that has parameter bindings. |