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

Safe HaskellNone
LanguageHaskell2010

Database.PostgreSQL.Query.Entity

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.

Associated Types

data EntityId a :: * Source

Id type for this entity

Methods

tableName :: Proxy a -> Text Source

Table name of this entity

fieldNames :: Proxy a -> [Text] 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