File: Types.hs

package info (click to toggle)
haskell-persistent 2.17.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,196 kB
  • sloc: haskell: 14,076; makefile: 3
file content (80 lines) | stat: -rw-r--r-- 2,778 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
-- | This module exports many types and functions for operating on
-- @persistent@'s database representation. It's a bit of a kitchen sink. In the
-- future, this module will be reorganized, and many of the dependent modules
-- will be viewable on their own for easier documentation and organization.
module Database.Persist.Types
    (
    -- * Various Types of Names
    -- | There are so many kinds of names. @persistent@ defines newtype wrappers
    -- for 'Text' so you don't confuse what a name is and what it is
    -- supposed to be used for
      module Database.Persist.Names
    -- * Database Definitions
    -- ** Entity/Table Definitions
    -- | The 'EntityDef' type is used by @persistent@ to generate Haskell code,
    -- generate database migrations, and maintain metadata about entities. These
    -- are generated in the call to 'Database.Persist.TH.mkPersist'.
    , module Database.Persist.EntityDef
    -- ** Field definitions
    -- | The 'FieldDef' type is used to describe how a field should be
    -- represented at the Haskell and database layers.
    , module Database.Persist.FieldDef
    -- * Intermediate Values
    -- | The 'PersistValue' type is used as an intermediate layer between
    -- database and Haskell types.
    , module Database.Persist.PersistValue
    -- * Other Useful Stuff
    , Update (..)
    , BackendSpecificUpdate
    , SelectOpt (..)
    , Filter (..)
    , FilterValue (..)
    , BackendSpecificFilter
    , Key
    , Entity (..)
    , OverflowNatural(..)
    -- * The rest of the types
    , module Database.Persist.Types.Base
    ) where

import Database.Persist.Class.PersistEntity
import Database.Persist.Class.PersistField
import Database.Persist.EntityDef
import Database.Persist.FieldDef
import Database.Persist.Names
import Database.Persist.PersistValue

-- this module is a bit of a kitchen sink of types and concepts. the guts of
-- persistent, just strewn across the table. in 2.13 let's get this cleaned up
-- and a bit more tidy.
import Database.Persist.Types.Base
       ( Attr
       , CascadeAction(..)
       , Checkmark(..)
       , CompositeDef(..)
       , EmbedEntityDef(..)
       , EmbedFieldDef(..)
       , ExtraLine
       , FieldAttr(..)
       , FieldCascade(..)
       , FieldDef(..)
       , FieldType(..)
       , ForeignDef(..)
       , ForeignFieldDef
       , IsNullable(..)
       , LiteralType(..)
       , PersistException(..)
       , PersistFilter(..)
       , PersistUpdate(..)
       , PersistValue(..)
       , ReferenceDef(..)
       , SqlType(..)
       , UniqueDef(..)
       , UpdateException(..)
       , WhyNullable(..)
       , fieldAttrsContainsNullable
       , keyAndEntityFields
       , keyAndEntityFieldsDatabase
       , noCascade
       , parseFieldAttrs
       )