postgresql-query-3.4.0: Sql interpolating quasiquote plus some kind of primitive ORM using it

Safe HaskellNone
LanguageHaskell2010

Database.PostgreSQL.Query.Entity.Class

Synopsis

Documentation

class Entity a where Source #

Auxiliary typeclass for data types which can map to rows of some table. This typeclass is used inside functions like pgSelectEntities to generate queries.

Minimal complete definition

tableName, fieldNames

Associated Types

data EntityId a :: * Source #

Id type for this entity

Methods

tableName :: Proxy a -> FN Source #

Table name of this entity

fieldNames :: Proxy a -> [FN] Source #

Field names without id and created. The order of field names must match with order of fields in ToRow and FromRow instances of this type.

type Ent a = (EntityId a, a) Source #

Entity with it's id