pg-store-0.2: Simple storage interface to PostgreSQL

Copyright(c) Ole Krüger 2016
LicenseBSD3
MaintainerOle Krüger <ole@vprsm.de>
Safe HaskellNone
LanguageHaskell2010

Database.PostgreSQL.Store.Entity

Contents

Description

 

Synopsis

Result and query entity

class Entity a where Source #

An entity that is used as a parameter or result of a query.

Methods

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.

Instances

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 #

bytea - byte array encoded in hex format

Entity ByteString Source #

bytea - byte array encoded in hex format

Entity Scientific Source #

Any numeric type

Entity String Source #

char, varchar or text - UTF-8 encoded

Entity Text Source #

char, varchar or text - UTF-8 encoded

Entity Value Source #

json or jsonb

Entity Text Source #

char, varchar or text - UTF-8 encoded

Entity Natural Source #

Any unsigned integer

Entity TypedValue Source #

Typed column value

Entity Value Source #

Untyped column value

Entity QueryBuilder Source #

QueryBuilder

Entity a => Entity (Maybe a) Source #

A value which may normally not be NULL.

(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

Methods

insertEntity :: (a, b, c) -> QueryBuilder Source #

parseEntity :: RowParser (a, b, c) Source #

(Entity a, Entity b, Entity c, Entity d) => Entity (a, b, c, d) Source #

4 result entities in sequence

Methods

insertEntity :: (a, b, c, d) -> QueryBuilder Source #

parseEntity :: RowParser (a, b, c, d) Source #

(Entity a, Entity b, Entity c, Entity d, Entity e) => Entity (a, b, c, d, e) Source #

5 result entities in sequence

Methods

insertEntity :: (a, b, c, d, e) -> QueryBuilder Source #

parseEntity :: RowParser (a, b, c, d, e) Source #

(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

Methods

insertEntity :: (a, b, c, d, e, f) -> QueryBuilder Source #

parseEntity :: RowParser (a, b, c, d, e, f) Source #

(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

Methods

insertEntity :: (a, b, c, d, e, f, g) -> QueryBuilder Source #

parseEntity :: RowParser (a, b, c, d, e, f, g) Source #

insertGeneric :: (GenericEntity a, GEntity (AnalyzeEntity a)) => a -> QueryBuilder Source #

Insert generic entity into the query.

Helpers

class GEntityRecord rec where Source #

Generic record entity

Minimal complete definition

gInsertRecord, gParseRecord

class GEntityEnum enum where Source #

Generic enumeration entity

Minimal complete definition

gInsertEnum, gEnumValues

class GEntity dat where Source #

Generic entity

Minimal complete definition

gInsertEntity, gParseEntity