]> Git — Sourcephile - gargantext.git/blob - src/Gargantext/Database/Schema/NodeNodeNgrams2.hs
[DOC] typo
[gargantext.git] / src / Gargantext / Database / Schema / NodeNodeNgrams2.hs
1 {-|
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
8 Portability : POSIX
9
10 -}
11
12 {-# OPTIONS_GHC -fno-warn-orphans #-}
13
14 {-# LANGUAGE Arrows #-}
15 {-# LANGUAGE FunctionalDependencies #-}
16 {-# LANGUAGE TemplateHaskell #-}
17
18 module Gargantext.Database.Schema.NodeNodeNgrams2
19 where
20
21 import Gargantext.Database.Schema.Prelude
22 import Gargantext.Database.Schema.NodeNgrams (NodeNgramsId)
23 import Gargantext.Database.Admin.Types.Node
24 import Prelude
25
26 data NodeNodeNgrams2Poly node_id nodengrams_id w
27 = NodeNodeNgrams2 { _nnng2_node_id :: !node_id
28 , _nnng2_nodengrams_id :: !nodengrams_id
29 , _nnng2_weight :: !w
30 } deriving (Show)
31
32 type NodeNodeNgrams2Write =
33 NodeNodeNgrams2Poly (Column PGInt4 )
34 (Column PGInt4 )
35 (Column PGFloat8)
36
37 type NodeNodeNgrams2Read =
38 NodeNodeNgrams2Poly (Column PGInt4 )
39 (Column PGInt4 )
40 (Column PGFloat8)
41
42 type NodeNodeNgrams2ReadNull =
43 NodeNodeNgrams2Poly (Column (Nullable PGInt4 ))
44 (Column (Nullable PGInt4 ))
45 (Column (Nullable PGFloat8))
46
47 type NodeNodeNgrams2 =
48 NodeNodeNgrams2Poly DocId NodeNgramsId Double
49
50 $(makeAdaptorAndInstance "pNodeNodeNgrams2" ''NodeNodeNgrams2Poly)
51 makeLenses ''NodeNodeNgrams2Poly
52
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"
59 }
60 )
61