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.NodeNodeNgrams2
21 import Gargantext.Database.Schema.Prelude
22 import Gargantext.Database.Schema.NodeNgrams (NodeNgramsId)
23 import Gargantext.Database.Admin.Types.Node
26 data NodeNodeNgrams2Poly node_id nodengrams_id w
27 = NodeNodeNgrams2 { _nnng2_node_id :: !node_id
28 , _nnng2_nodengrams_id :: !nodengrams_id
32 type NodeNodeNgrams2Write =
33 NodeNodeNgrams2Poly (Column PGInt4 )
37 type NodeNodeNgrams2Read =
38 NodeNodeNgrams2Poly (Column PGInt4 )
42 type NodeNodeNgrams2ReadNull =
43 NodeNodeNgrams2Poly (Column (Nullable PGInt4 ))
44 (Column (Nullable PGInt4 ))
45 (Column (Nullable PGFloat8))
47 type NodeNodeNgrams2 =
48 NodeNodeNgrams2Poly DocId NodeNgramsId Double
50 $(makeAdaptorAndInstance "pNodeNodeNgrams2" ''NodeNodeNgrams2Poly)
51 makeLenses ''NodeNodeNgrams2Poly
53 nodeNodeNgrams2Table :: Table NodeNodeNgrams2Write NodeNodeNgrams2Read
54 nodeNodeNgrams2Table = Table "node_node_ngrams2"
55 ( pNodeNodeNgrams2 NodeNodeNgrams2
56 { _nnng2_node_id = required "node_id"
57 , _nnng2_nodengrams_id = required "nodengrams_id"
58 , _nnng2_weight = required "weight"