Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
-
data
FromBackendRowF
be f
where
- ParseOneField :: ( BackendFromField be a, Typeable a) => (a -> f) -> FromBackendRowF be f
- Alt :: FromBackendRowM be a -> FromBackendRowM be a -> (a -> f) -> FromBackendRowF be f
- FailParseWith :: BeamRowReadError -> FromBackendRowF be f
- newtype FromBackendRowM be a = FromBackendRowM ( F ( FromBackendRowF be) a)
- parseOneField :: ( BackendFromField be a, Typeable a) => FromBackendRowM be a
- peekField :: ( Typeable a, BackendFromField be a) => FromBackendRowM be ( Maybe a)
- data ColumnParseError
-
data
BeamRowReadError
=
BeamRowReadError
{
- brreColumn :: !( Maybe Int )
- brreError :: ! ColumnParseError
-
class
BeamBackend
be =>
FromBackendRow
be a
where
- fromBackendRow :: FromBackendRowM be a
- valuesNeeded :: Proxy be -> Proxy a -> Int
Documentation
data FromBackendRowF be f where Source #
ParseOneField :: ( BackendFromField be a, Typeable a) => (a -> f) -> FromBackendRowF be f | |
Alt :: FromBackendRowM be a -> FromBackendRowM be a -> (a -> f) -> FromBackendRowF be f | |
FailParseWith :: BeamRowReadError -> FromBackendRowF be f |
Instances
Functor ( FromBackendRowF be) Source # | |
Defined in Database.Beam.Backend.SQL.Row fmap :: (a -> b) -> FromBackendRowF be a -> FromBackendRowF be b Source # (<$) :: a -> FromBackendRowF be b -> FromBackendRowF be a Source # |
newtype FromBackendRowM be a Source #
FromBackendRowM ( F ( FromBackendRowF be) a) |
Instances
parseOneField :: ( BackendFromField be a, Typeable a) => FromBackendRowM be a Source #
peekField :: ( Typeable a, BackendFromField be a) => FromBackendRowM be ( Maybe a) Source #
data ColumnParseError Source #
The exact error encountered
ColumnUnexpectedNull | |
ColumnNotEnoughColumns ! Int | |
ColumnTypeMismatch | |
|
|
ColumnErrorInternal String |
Instances
Eq ColumnParseError Source # | |
Defined in Database.Beam.Backend.SQL.Row (==) :: ColumnParseError -> ColumnParseError -> Bool Source # (/=) :: ColumnParseError -> ColumnParseError -> Bool Source # |
|
Ord ColumnParseError Source # | |
Defined in Database.Beam.Backend.SQL.Row compare :: ColumnParseError -> ColumnParseError -> Ordering Source # (<) :: ColumnParseError -> ColumnParseError -> Bool Source # (<=) :: ColumnParseError -> ColumnParseError -> Bool Source # (>) :: ColumnParseError -> ColumnParseError -> Bool Source # (>=) :: ColumnParseError -> ColumnParseError -> Bool Source # max :: ColumnParseError -> ColumnParseError -> ColumnParseError Source # min :: ColumnParseError -> ColumnParseError -> ColumnParseError Source # |
|
Show ColumnParseError Source # | |
Defined in Database.Beam.Backend.SQL.Row |
data BeamRowReadError Source #
An error that may occur when parsing a row. Contains an optional annotation of which column was being parsed (if available).
BeamRowReadError | |
|
Instances
Eq BeamRowReadError Source # | |
Defined in Database.Beam.Backend.SQL.Row (==) :: BeamRowReadError -> BeamRowReadError -> Bool Source # (/=) :: BeamRowReadError -> BeamRowReadError -> Bool Source # |
|
Ord BeamRowReadError Source # | |
Defined in Database.Beam.Backend.SQL.Row compare :: BeamRowReadError -> BeamRowReadError -> Ordering Source # (<) :: BeamRowReadError -> BeamRowReadError -> Bool Source # (<=) :: BeamRowReadError -> BeamRowReadError -> Bool Source # (>) :: BeamRowReadError -> BeamRowReadError -> Bool Source # (>=) :: BeamRowReadError -> BeamRowReadError -> Bool Source # max :: BeamRowReadError -> BeamRowReadError -> BeamRowReadError Source # min :: BeamRowReadError -> BeamRowReadError -> BeamRowReadError Source # |
|
Show BeamRowReadError Source # | |
Defined in Database.Beam.Backend.SQL.Row |
|
Exception BeamRowReadError Source # | |
Defined in Database.Beam.Backend.SQL.Row |
class BeamBackend be => FromBackendRow be a where Source #
Nothing
fromBackendRow :: FromBackendRowM be a Source #
Parses a beam row. This should not fail, except in the case of
an internal bug in beam deserialization code. If it does fail,
this should throw a
BeamRowParseError
.
default fromBackendRow :: ( Typeable a, BackendFromField be a) => FromBackendRowM be a Source #