persistent-0.0.0: Type-safe, non-relational, multi-backend persistence.

Database.Persist.Helper

Contents

Description

This module provides utilities for creating backends. Regular users do not need to use this module.

Synopsis

Documentation

High level design

data EntityDef Source

Constructors

EntityDef 

Fields

entityName :: String
 
entityColumns :: [(String, String, [String])]

name, type, attribs

entityUniques :: [(String, [String])]

name, columns

entityDerives :: [String]
 

TH datatype helpers

TH typeclass helpers

Type classes

class ToFieldNames a whereSource

Methods

toFieldNames :: a -> [String]Source

class ToOrder a whereSource

data PersistOrder Source

Constructors

Asc 
Desc 

class ToFieldName a whereSource

Methods

toFieldName :: a -> StringSource

data PersistFilter Source

Constructors

Eq 
Ne 
Gt 
Lt 
Ge 
Le 

class ToFilter a whereSource

class HalfDefined a whereSource

Methods

halfDefined :: aSource

Utils

apE :: Either x (y -> z) -> Either x y -> Either x zSource