]> Git — Sourcephile - gargantext.git/blob - src/Gargantext/Database/Schema/NodeContext_NodeContext.hs
Merge branch '97-dev-istex-search' of ssh://gitlab.iscpif.fr:20022/gargantext/haskell...
[gargantext.git] / src / Gargantext / Database / Schema / NodeContext_NodeContext.hs
1 {-|
2 Module : Gargantext.Database.Schema.ContextContext
3 Description :
4 Copyright : (c) CNRS, 2017-Present
5 License : AGPL + CECILL v3
6 Maintainer : team@gargantext.org
7 Stability : experimental
8 Portability : POSIX
9
10 -}
11
12 {-# OPTIONS_GHC -fno-warn-orphans #-}
13
14 {-# LANGUAGE Arrows #-}
15 {-# LANGUAGE FunctionalDependencies #-}
16 {-# LANGUAGE QuasiQuotes #-}
17 {-# LANGUAGE TemplateHaskell #-}
18
19 module Gargantext.Database.Schema.NodeContext_NodeContext where
20
21 import Gargantext.Core.Types
22 import Gargantext.Database.Schema.Prelude
23 import Gargantext.Prelude
24
25
26
27 data NodeContext_NodeContextPoly nodecontext1 nodecontext2
28 = NodeContext_NodeContext { _ncnc_nodecontext1 :: !nodecontext1
29 , _ncnc_nodecontext2 :: !nodecontext2
30 } deriving (Show)
31
32 type NodeContext_NodeContextWrite = NodeContext_NodeContextPoly (Column (SqlInt4))
33 (Column (SqlInt4))
34
35 type NodeContext_NodeContextRead = NodeContext_NodeContextPoly (Column (SqlInt4))
36 (Column (SqlInt4))
37
38 type NodeContext_NodeContextReadNull = NodeContext_NodeContextPoly (Column (Nullable SqlInt4))
39 (Column (Nullable SqlInt4))
40
41 type NodeContext_NodeContext = NodeContext_NodeContextPoly NodeContextId NodeContextId
42
43 $(makeAdaptorAndInstance "pNodeContext_NodeContext" ''NodeContext_NodeContextPoly)
44 makeLenses ''NodeContext_NodeContextPoly
45
46 nodeContext_NodeContextTable :: Table NodeContext_NodeContextWrite NodeContext_NodeContextRead
47 nodeContext_NodeContextTable =
48 Table "nodescontexts_nodescontexts"
49 ( pNodeContext_NodeContext
50 NodeContext_NodeContext { _ncnc_nodecontext1 = requiredTableField "nodescontexts1"
51 , _ncnc_nodecontext2 = requiredTableField "nodescontexts2"
52 }
53 )
54 queryNodeContext_NodeContextTable :: Query NodeContext_NodeContextRead
55 queryNodeContext_NodeContextTable = selectTable nodeContext_NodeContextTable
56
57
58