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 FlexibleContexts #-}
16 {-# LANGUAGE FlexibleInstances #-}
17 {-# LANGUAGE FunctionalDependencies #-}
18 {-# LANGUAGE MultiParamTypeClasses #-}
19 {-# LANGUAGE NoImplicitPrelude #-}
20 {-# LANGUAGE RankNTypes #-}
21 {-# LANGUAGE TemplateHaskell #-}
23 module Gargantext.Database.Schema.NodeNodeNgrams2
26 import Gargantext.Database.Schema.Prelude
27 import Gargantext.Database.Schema.NodeNgrams (NodeNgramsId)
28 import Gargantext.Database.Admin.Types.Node (pgNodeId)
29 import Gargantext.Database.Admin.Types.Node
32 data NodeNodeNgrams2Poly node_id nodengrams_id w
33 = NodeNodeNgrams2 { _nnng2_node_id :: !node_id
34 , _nnng2_nodengrams_id :: !nodengrams_id
38 type NodeNodeNgrams2Write =
39 NodeNodeNgrams2Poly (Column PGInt4 )
43 type NodeNodeNgrams2Read =
44 NodeNodeNgrams2Poly (Column PGInt4 )
48 type NodeNodeNgrams2ReadNull =
49 NodeNodeNgrams2Poly (Column (Nullable PGInt4 ))
50 (Column (Nullable PGInt4 ))
51 (Column (Nullable PGFloat8))
53 type NodeNodeNgrams2 =
54 NodeNodeNgrams2Poly DocId NodeNgramsId Double
56 $(makeAdaptorAndInstance "pNodeNodeNgrams2" ''NodeNodeNgrams2Poly)
57 makeLenses ''NodeNodeNgrams2Poly
59 nodeNodeNgrams2Table :: Table NodeNodeNgrams2Write NodeNodeNgrams2Read
60 nodeNodeNgrams2Table = Table "node_node_ngrams2"
61 ( pNodeNodeNgrams2 NodeNodeNgrams2
62 { _nnng2_node_id = required "node_id"
63 , _nnng2_nodengrams_id = required "nodengrams_id"
64 , _nnng2_weight = required "weight"