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

Safe HaskellNone

Database.Persist.Query.Join

Contents

Synopsis

Typeclass

class PersistQuery m => RunJoin a m whereSource

Associated Types

type Result a Source

Methods

runJoin :: a -> m (Result a)Source

Instances

One-to-many relation

data SelectOneMany one many Source

Constructors

SelectOneMany 

Fields

somFilterOne :: [Filter one]
 
somOrderOne :: [SelectOpt one]
 
somFilterMany :: [Filter many]
 
somOrderMany :: [SelectOpt many]
 
somFilterKeys :: [Key one] -> Filter many
 
somGetKey :: many -> Key one
 
somIncludeNoMatch :: Bool
 

Instances

(PersistEntity one, PersistEntity many, Eq (Key one)) => RunJoin (SelectOneMany one many) 
(PersistEntity one, PersistEntity many, Ord (Key one), PersistQuery monad, ~ * (PersistMonadBackend monad) (PersistEntityBackend one), ~ * (PersistEntityBackend one) (PersistEntityBackend many)) => RunJoin (SelectOneMany one many) monad 

selectOneMany :: ([Key one] -> Filter many) -> (many -> Key one) -> SelectOneMany one manySource