persistent-2.2.1: Type-safe, multi-backend data serialization.

Safe HaskellNone
LanguageHaskell98

Database.Persist

Contents

Synopsis

Documentation

query combinators

(=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Update v infixr 3 Source

assign a field a value

(+=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Update v infixr 3 Source

assign a field by addition (+=)

(-=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Update v infixr 3 Source

assign a field by subtraction (-=)

(*=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Update v infixr 3 Source

assign a field by multiplication (*=)

(/=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Update v infixr 3 Source

assign a field by division (/=)

(==.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v infix 4 Source

(!=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v infix 4 Source

(<.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v infix 4 Source

(>.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v infix 4 Source

(<=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v infix 4 Source

(>=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v infix 4 Source

(<-.) :: forall v typ. PersistField typ => EntityField v typ -> [typ] -> Filter v infix 4 Source

In

(/<-.) :: forall v typ. PersistField typ => EntityField v typ -> [typ] -> Filter v infix 4 Source

NotIn

(||.) :: forall v. [Filter v] -> [Filter v] -> [Filter v] infixl 3 Source

the OR of two lists of filters. For example: selectList([PersonAge >. 25, PersonAge 30] ||. [PersonIncome. 15000, PersonIncome <. 25000]) [] will filter records where a person's age is between (25 and 30) OR a person's income is between (15,000 and 25000). If you are looking for an &&. operator to do (A AND B AND (C OR D)) you can use the ++ operator instead as there is no &&. For example: selectList([PersonAge >. 25, PersonAge <. 30] ++ ([PersonCategory ==. 1] ||. [PersonCategory ==. 5])) [] will filter records where a person's age is between (25 and 30) AND (person's category is either 1 or 5)

JSON Utilities

Other utililities