-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Type-safe, non-relational, multi-backend persistence.
--
-- This library provides just the general interface and helper functions.
-- You must use a specific backend in order to make this useful.
@package persistent-template
@version 0.6.2
-- | This module provides utilities for creating backends. Regular users do
-- not need to use this module.
module Database.Persist.TH
-- | Create data types and appropriate PersistEntity instances for
-- the given EntityDefs. Works well with the persist quasi-quoter.
mkPersist :: MkPersistSettings -> [EntityDef] -> Q [Dec]
share :: [[EntityDef] -> Q [Dec]] -> [EntityDef] -> Q [Dec]
-- | Converts a quasi-quoted syntax into a list of entity definitions, to
-- be used as input to the template haskell generation code (mkPersist).
persist :: QuasiQuoter
persistFile :: FilePath -> Q Exp
share2 :: ([EntityDef] -> Q [Dec]) -> ([EntityDef] -> Q [Dec]) -> [EntityDef] -> Q [Dec]
mkSave :: String -> [EntityDef] -> Q [Dec]
mkDeleteCascade :: [EntityDef] -> Q [Dec]
-- | Automatically creates a valid PersistField instance for any
-- datatype that has valid Show and Read instances. Can be
-- very convenient for Enum types.
derivePersistField :: String -> Q [Dec]
-- | Creates a single function to perform all migrations for the entities
-- defined here. One thing to be aware of is dependencies: if you have
-- entities with foreign references, make sure to place those definitions
-- after the entities they reference.
mkMigrate :: String -> [EntityDef] -> Q [Dec]
data MkPersistSettings
MkPersistSettings :: Type -> MkPersistSettings
mpsBackend :: MkPersistSettings -> Type
sqlSettings :: MkPersistSettings
instance Lift PersistUpdate
instance Lift PersistFilter
instance Lift UniqueDef
instance Lift ColumnDef
instance Lift EntityDef