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
31 data NodeNodeNgrams2Poly node_id nodengrams_id w
32 = NodeNodeNgrams2 { _nnng2_node_id :: !node_id
33 , _nnng2_nodengrams_id :: !nodengrams_id
37 type NodeNodeNgrams2Write =
38 NodeNodeNgrams2Poly (Column PGInt4 )
42 type NodeNodeNgrams2Read =
43 NodeNodeNgrams2Poly (Column PGInt4 )
47 type NodeNodeNgrams2ReadNull =
48 NodeNodeNgrams2Poly (Column (Nullable PGInt4 ))
49 (Column (Nullable PGInt4 ))
50 (Column (Nullable PGFloat8))
52 type NodeNodeNgrams2 =
53 NodeNodeNgrams2Poly DocId NodeNgramsId Double
55 $(makeAdaptorAndInstance "pNodeNodeNgrams2" ''NodeNodeNgrams2Poly)
56 makeLenses ''NodeNodeNgrams2Poly
58 nodeNodeNgrams2Table :: Table NodeNodeNgrams2Write NodeNodeNgrams2Read
59 nodeNodeNgrams2Table = Table "node_node_ngrams2"
60 ( pNodeNodeNgrams2 NodeNodeNgrams2
61 { _nnng2_node_id = required "node_id"
62 , _nnng2_nodengrams_id = required "nodengrams_id"
63 , _nnng2_weight = required "weight"