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 = ContextNodeNgrams2Poly ContextId NodeNgramsId Double
30 data ContextNodeNgrams2Poly context_id nodengrams_id w
31 = ContextNodeNgrams2 { _cnng2_context_id :: !context_id
32 , _cnng2_nodengrams_id :: !nodengrams_id
36 type ContextNodeNgrams2Write =
37 ContextNodeNgrams2Poly (Column SqlInt4 )
41 type ContextNodeNgrams2Read =
42 ContextNodeNgrams2Poly (Column SqlInt4 )
46 $(makeAdaptorAndInstance "pContextNodeNgrams2" ''ContextNodeNgrams2Poly)
47 makeLenses ''ContextNodeNgrams2Poly
49 contextNodeNgrams2Table :: Table ContextNodeNgrams2Write ContextNodeNgrams2Read
50 contextNodeNgrams2Table = Table "context_node_ngrams2"
51 ( pContextNodeNgrams2 ContextNodeNgrams2
52 { _cnng2_context_id = requiredTableField "context_id"
53 , _cnng2_nodengrams_id = requiredTableField "nodengrams_id"
54 , _cnng2_weight = requiredTableField "weight"