Update README.md
[gargantext.git] / src / Gargantext / Database / Schema / NodesNgramsRepo.hs
index 111c83350016dbf75032cb64f567fca66986c5fb..cd78997156e745d29d5472609f202de45445a181 100644 (file)
@@ -21,10 +21,11 @@ Portability : POSIX
 module Gargantext.Database.Schema.NodesNgramsRepo
   where
 
+{-
 import Data.Map.Strict.Patch (PatchMap)
 
 import Gargantext.Database.Schema.Prelude
-import Gargantext.API.Ngrams.Types (NgramsStatePatch, NgramsTablePatch)
+import Gargantext.API.Ngrams.Types (NgramsTablePatch)
 import Gargantext.Database.Schema.Ngrams (NgramsType)
 import Gargantext.Database.Admin.Types.Node (NodeId)
 import Gargantext.Prelude
@@ -36,27 +37,27 @@ data RepoDbPoly version patches
                   } deriving (Show)
 
 type RepoDbWrite
-  = RepoDbPoly (Column PGInt4)
-             (Column PGJsonb)
+  = RepoDbPoly (Column SqlInt4)
+             (Column SqlJsonb)
 type RepoDbRead
-  = RepoDbPoly (Column PGInt4)
-             (Column PGJsonb)
+  = RepoDbPoly (Column SqlInt4)
+             (Column SqlJsonb)
 
 type RepoDbNgrams = RepoDbPoly Int NgramsStatePatch
 $(makeAdaptorAndInstance "pRepoDbNgrams" ''RepoDbPoly)
 makeLenses ''RepoDbPoly
 
-instance QueryRunnerColumnDefault PGJsonb
+instance DefaultFromField SqlJsonb
                           (PatchMap NgramsType
                           (PatchMap NodeId NgramsTablePatch))
   where
-    queryRunnerColumnDefault = fieldQueryRunnerColumn
+    defaultFromField = fromPGSFromField
 
 repoTable :: Table RepoDbWrite RepoDbRead
 repoTable = Table "nodes_ngrams_repo"
     (pRepoDbNgrams RepoDbNgrams
-                   { _rdp_version = required "version"
-                   , _rdp_patches = required "patches"
+                   { _rdp_version = requiredTableField "version"
+                   , _rdp_patches = requiredTableField "patches"
                    }
     )
-
+-}