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 # (<$) :: a -> FromBackendRowF be b -> FromBackendRowF be a # |
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 # (/=) :: ColumnParseError -> ColumnParseError -> Bool # | |
Ord ColumnParseError Source # | |
Defined in Database.Beam.Backend.SQL.Row compare :: ColumnParseError -> ColumnParseError -> Ordering # (<) :: ColumnParseError -> ColumnParseError -> Bool # (<=) :: ColumnParseError -> ColumnParseError -> Bool # (>) :: ColumnParseError -> ColumnParseError -> Bool # (>=) :: ColumnParseError -> ColumnParseError -> Bool # max :: ColumnParseError -> ColumnParseError -> ColumnParseError # min :: ColumnParseError -> ColumnParseError -> ColumnParseError # | |
Show ColumnParseError Source # | |
Defined in Database.Beam.Backend.SQL.Row showsPrec :: Int -> ColumnParseError -> ShowS # show :: ColumnParseError -> String # showList :: [ColumnParseError] -> ShowS # |
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 # (/=) :: BeamRowReadError -> BeamRowReadError -> Bool # | |
Ord BeamRowReadError Source # | |
Defined in Database.Beam.Backend.SQL.Row compare :: BeamRowReadError -> BeamRowReadError -> Ordering # (<) :: BeamRowReadError -> BeamRowReadError -> Bool # (<=) :: BeamRowReadError -> BeamRowReadError -> Bool # (>) :: BeamRowReadError -> BeamRowReadError -> Bool # (>=) :: BeamRowReadError -> BeamRowReadError -> Bool # max :: BeamRowReadError -> BeamRowReadError -> BeamRowReadError # min :: BeamRowReadError -> BeamRowReadError -> BeamRowReadError # | |
Show BeamRowReadError Source # | |
Defined in Database.Beam.Backend.SQL.Row showsPrec :: Int -> BeamRowReadError -> ShowS # show :: BeamRowReadError -> String # showList :: [BeamRowReadError] -> ShowS # | |
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
.
fromBackendRow :: (Typeable a, BackendFromField be a) => 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
.