2 Module : Gargantext.Database.Schema.NodeNodeNgrams
3 Description : TODO: remove this module and table in database
4 Copyright : (c) CNRS, 2017-Present
5 License : AGPL + CECILL v3
6 Maintainer : team@gargantext.org
7 Stability : experimental
12 {-# OPTIONS_GHC -fno-warn-orphans #-}
14 {-# LANGUAGE Arrows #-}
15 {-# LANGUAGE FunctionalDependencies #-}
16 {-# LANGUAGE TemplateHaskell #-}
18 module Gargantext.Database.Schema.ContextNodeNgrams2
21 import Gargantext.Database.Admin.Types.Node
22 import Gargantext.Database.Schema.NodeNgrams (NodeNgramsId)
23 import Gargantext.Database.Schema.Prelude
27 type ContextNodeNgrams2 =
28 ContextNodeNgrams2Poly ContextId NodeNgramsId Weight
32 data ContextNodeNgrams2Poly context_id nodengrams_id w
33 = ContextNodeNgrams2 { _cnng2_context_id :: !context_id
34 , _cnng2_nodengrams_id :: !nodengrams_id
38 type ContextNodeNgrams2Write =
39 ContextNodeNgrams2Poly (Column SqlInt4 )
43 type ContextNodeNgrams2Read =
44 ContextNodeNgrams2Poly (Column SqlInt4 )
48 type ContextNodeNgrams2ReadNull =
49 ContextNodeNgrams2Poly (Column (Nullable SqlInt4 ))
50 (Column (Nullable SqlInt4 ))
51 (Column (Nullable SqlFloat8))
53 $(makeAdaptorAndInstance "pContextNodeNgrams2" ''ContextNodeNgrams2Poly)
54 makeLenses ''ContextNodeNgrams2Poly
56 contextNodeNgrams2Table :: Table ContextNodeNgrams2Write ContextNodeNgrams2Read
57 contextNodeNgrams2Table = Table "context_node_ngrams2"
58 ( pContextNodeNgrams2 ContextNodeNgrams2
59 { _cnng2_context_id = requiredTableField "context_id"
60 , _cnng2_nodengrams_id = requiredTableField "nodengrams_id"
61 , _cnng2_weight = requiredTableField "weight"