| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Database.DuckDB.Simple.FromRow
Description
Synopsis
- data RowParser a
- field :: FromField a => RowParser a
- fieldWith :: FieldParser a -> RowParser a
- numFieldsRemaining :: RowParser Int
- parseRow :: RowParser a -> [Field] -> Ok a
- class GFromRow (f :: Type -> Type) where
- class FromRow a where
- resultErrorToSqlError :: Query -> ResultError -> SQLError
- rowErrorsToSqlError :: Query -> [SomeException] -> SQLError
Row parsing
Parser used by FromRow implementations.
field :: FromField a => RowParser a Source #
Pull the next field and parse it using its FromField instance.
fieldWith :: FieldParser a -> RowParser a Source #
Pull the next field using the provided FieldParser.
numFieldsRemaining :: RowParser Int Source #
Report how many columns remain unread in the current row.
Generic derivation
class GFromRow (f :: Type -> Type) where Source #
Generic derivation helper mirroring sqlite-simple.
class FromRow a where Source #
Types that can be constructed from database rows.
Minimal complete definition
Nothing
Methods
Instances
Error conversion
resultErrorToSqlError :: Query -> ResultError -> SQLError Source #
Convert a ResultError into a user-facing SQLError.
rowErrorsToSqlError :: Query -> [SomeException] -> SQLError Source #
Collapse parser failure diagnostics into an SQLError while preserving the query.