Copyright | (c) Ole Krüger 2016 |
---|---|
License | BSD3 |
Maintainer | Ole Krüger <ole@vprsm.de> |
Safe Haskell | None |
Language | Haskell2010 |
- class Entity a where
- insertGeneric :: (GenericEntity a, GEntity (AnalyzeEntity a)) => a -> QueryBuilder
- parseGeneric :: (GenericEntity a, GEntity (AnalyzeEntity a)) => RowParser a
- class GEntityRecord rec where
- class GEntityEnum enum where
- class GEntity dat where
Result and query entity
An entity that is used as a parameter or result of a query.
insertEntity :: a -> QueryBuilder Source #
Insert an instance of a
into the query.
insertEntity :: (GenericEntity a, GEntity (AnalyzeEntity a)) => a -> QueryBuilder Source #
Insert an instance of a
into the query.
parseEntity :: RowParser a Source #
Retrieve an instance of a
from the result set.
parseEntity :: (GenericEntity a, GEntity (AnalyzeEntity a)) => RowParser a Source #
Retrieve an instance of a
from the result set.
Entity Bool Source # | boolean |
Entity Double Source # | Any floating-point number |
Entity Float Source # | Any floating-point number |
Entity Int Source # | Any integer |
Entity Int8 Source # | Any integer |
Entity Int16 Source # | Any integer |
Entity Int32 Source # | Any integer |
Entity Int64 Source # | Any integer |
Entity Integer Source # | Any integer |
Entity Word Source # | Any unsigned integer |
Entity Word8 Source # | Any unsigned integer |
Entity Word16 Source # | Any unsigned integer |
Entity Word32 Source # | Any unsigned integer |
Entity Word64 Source # | Any unsigned integer |
Entity ByteString Source # |
|
Entity ByteString Source # |
|
Entity Scientific Source # | Any numeric type |
Entity String Source # |
|
Entity Text Source # |
|
Entity Value Source # |
|
Entity Text Source # |
|
Entity Natural Source # | Any unsigned integer |
Entity TypedValue Source # | Typed column value |
Entity Value Source # | Untyped column value |
Entity QueryBuilder Source # | |
Entity a => Entity (Maybe a) Source # | A value which may normally not be |
(Entity a, Entity b) => Entity (a, b) Source # | 2 result entities in sequence |
(Entity a, Entity b, Entity c) => Entity (a, b, c) Source # | 3 result entities in sequence |
(Entity a, Entity b, Entity c, Entity d) => Entity (a, b, c, d) Source # | 4 result entities in sequence |
(Entity a, Entity b, Entity c, Entity d, Entity e) => Entity (a, b, c, d, e) Source # | 5 result entities in sequence |
(Entity a, Entity b, Entity c, Entity d, Entity e, Entity f) => Entity (a, b, c, d, e, f) Source # | 6 result entities in sequence |
(Entity a, Entity b, Entity c, Entity d, Entity e, Entity f, Entity g) => Entity (a, b, c, d, e, f, g) Source # | 7 result entities in sequence |
insertGeneric :: (GenericEntity a, GEntity (AnalyzeEntity a)) => a -> QueryBuilder Source #
Insert generic entity into the query.
parseGeneric :: (GenericEntity a, GEntity (AnalyzeEntity a)) => RowParser a Source #
Generic RowParser
for an entity.
Helpers
class GEntityRecord rec where Source #
Generic record entity
gInsertRecord :: Record rec -> QueryBuilder Source #
gParseRecord :: RowParser (Record rec) Source #
(GEntityRecord lhs, GEntityRecord rhs) => GEntityRecord (TCombine lhs rhs) Source # | |
Entity typ => GEntityRecord (TSingle meta typ) Source # | |
class GEntityEnum enum where Source #
Generic enumeration entity
gInsertEnum :: FlatSum enum -> QueryBuilder Source #
gEnumValues :: [(ByteString, FlatSum enum)] Source #
KnownSymbol name => GEntityEnum (TValue (MetaCons name f r)) Source # | |
(GEntityEnum lhs, GEntityEnum rhs) => GEntityEnum (TChoose lhs rhs) Source # | |
class GEntity dat where Source #
Generic entity
gInsertEntity :: DataType dat -> QueryBuilder Source #
gParseEntity :: RowParser (DataType dat) Source #
GEntityEnum enum => GEntity (TFlatSum d enum) Source # | |
GEntityRecord rec => GEntity (TRecord d c rec) Source # | |