[FIX] merge
[gargantext.git] / src / Gargantext / Database / Schema / Node_NodeNgramsNodeNgrams.hs
index a4dfe4c4f2b298afc31db8595a2fb9dabd85a856..d8f3e4ff0fda2ea1500088291406abdd99da2341 100644 (file)
@@ -31,8 +31,6 @@ Next Step benchmark:
 module Gargantext.Database.Schema.Node_NodeNgramsNodeNgrams
   where
 
-import Control.Lens.TH (makeLensesWith, abbreviatedFields)
-import Data.Maybe (Maybe)
 import Gargantext.Database.Schema.Prelude
 import Gargantext.Database.Admin.Types.Node (CorpusId)
 import Gargantext.Database.Schema.Node()
@@ -74,16 +72,16 @@ node_NodeNgrams_NodeNgrams_Table :: Table Node_NodeNgrams_NodeNgrams_Write Node_
 node_NodeNgrams_NodeNgrams_Table =
   Table "node_nodengrams_nodengrams"
        ( pNode_NodeNgrams_NodeNgrams Node_NodeNgrams_NodeNgrams
-                       { _nnn_node_id = required "node_id"
-                       , _nnn_nng1_id = optional "node_ngrams1_id"
-                       , _nnn_nng2_id = required "node_ngrams2_id"
-                       , _nnn_weight  = optional "weight"
+                       { _nnn_node_id = requiredTableField "node_id"
+                       , _nnn_nng1_id = optionalTableField "node_ngrams1_id"
+                       , _nnn_nng2_id = requiredTableField "node_ngrams2_id"
+                       , _nnn_weight  = optionalTableField "weight"
                        }
        )
 
-instance QueryRunnerColumnDefault PGInt4 (Maybe Int) where
-    queryRunnerColumnDefault = fieldQueryRunnerColumn
+instance DefaultFromField PGInt4 (Maybe Int) where
+    defaultFromField = fieldQueryRunnerColumn
 
-instance QueryRunnerColumnDefault PGFloat8 (Maybe Double) where
-    queryRunnerColumnDefault = fieldQueryRunnerColumn
+instance DefaultFromField PGFloat8 (Maybe Double) where
+    defaultFromField = fieldQueryRunnerColumn