]> Git — Sourcephile - gargantext.git/blob - src/Gargantext/Database/Schema/NodeContext_NodeContext.hs
Merge branch 'dev' into dev-openalex
[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_NodeContext = NodeContext_NodeContextPoly NodeContextId NodeContextId
39
40 $(makeAdaptorAndInstance "pNodeContext_NodeContext" ''NodeContext_NodeContextPoly)
41 makeLenses ''NodeContext_NodeContextPoly
42
43 nodeContext_NodeContextTable :: Table NodeContext_NodeContextWrite NodeContext_NodeContextRead
44 nodeContext_NodeContextTable =
45 Table "nodescontexts_nodescontexts"
46 ( pNodeContext_NodeContext
47 NodeContext_NodeContext { _ncnc_nodecontext1 = requiredTableField "nodescontexts1"
48 , _ncnc_nodecontext2 = requiredTableField "nodescontexts2"
49 }
50 )
51 queryNodeContext_NodeContextTable :: Query NodeContext_NodeContextRead
52 queryNodeContext_NodeContextTable = selectTable nodeContext_NodeContextTable