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 SqlInt4 )
37 type NodeNodeNgrams2Read =
38 NodeNodeNgrams2Poly (Column SqlInt4 )
42 type NodeNodeNgrams2 =
43 NodeNodeNgrams2Poly DocId NodeNgramsId Double
45 $(makeAdaptorAndInstance "pNodeNodeNgrams2" ''NodeNodeNgrams2Poly)
46 makeLenses ''NodeNodeNgrams2Poly
48 nodeNodeNgrams2Table :: Table NodeNodeNgrams2Write NodeNodeNgrams2Read
49 nodeNodeNgrams2Table = Table "node_node_ngrams2"
50 ( pNodeNodeNgrams2 NodeNodeNgrams2
51 { _nnng2_node_id = requiredTableField "node_id"
52 , _nnng2_nodengrams_id = requiredTableField "nodengrams_id"
53 , _nnng2_weight = requiredTableField "weight"