[FEAT] serving static files for front-end.
[gargantext.git] / src / Gargantext / Database / NodeNode.hs
index 87a5537122d415c9a96486184846d0c7f5049aa5..279673a936c73850c42756a55f2d9596d0c4bc79 100644 (file)
@@ -22,23 +22,29 @@ data NodeNodePoly node1_id node2_id score
                               , nodeNode_score :: score
                               } deriving (Show)
 
-type NodeNodeWrite = NodeNodePoly (Column PGInt4) (Column PGInt4) (Column (Nullable PGFloat8))
-type NodeNodeRead  = NodeNodePoly (Column PGInt4) (Column PGInt4) (Column (Nullable PGFloat8))
+type NodeNodeWrite     = NodeNodePoly (Column (Nullable PGInt4)) 
+                                      (Column (PGInt4)) 
+                                      (Column (Nullable PGFloat8))
 
+type NodeNodeRead      = NodeNodePoly (Column (Nullable PGInt4)) 
+                                      (Column (PGInt4)) 
+                                      (Column (Nullable PGFloat8))
+
+type NodeNodeReadNull  = NodeNodePoly (Column (Nullable PGInt4)) 
+                                      (Column (Nullable PGInt4)) 
+                                      (Column (Nullable PGFloat8))
 
 type NodeNode = NodeNodePoly Int Int (Maybe Double)
 
 $(makeAdaptorAndInstance "pNodeNode" ''NodeNodePoly)
 $(makeLensesWith abbreviatedFields   ''NodeNodePoly)
 
-
-nodeNodeTable :: Table NodeNodeWrite NodeNodeRead
+nodeNodeTable :: Table NodeNodeWrite NodeNodeRead 
 nodeNodeTable  = Table "nodes_nodes" (pNodeNode NodeNode { nodeNode_node1_id = required "node1_id"
-                                                           , nodeNode_node2_id = required "node2_id"
-                                                           , nodeNode_score    = required "score"
-                                                           }
-                                       )
-
+                                         , nodeNode_node2_id = required "node2_id"
+                                         , nodeNode_score    = required "score"
+                                     }
+                                     )
 
 queryNodeNodeTable :: Query NodeNodeRead
 queryNodeNodeTable = queryTable nodeNodeTable