-}
{-# LANGUAGE Arrows #-}
-{-# LANGUAGE FlexibleContexts #-}
-{-# LANGUAGE NoImplicitPrelude #-}
-{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
-{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
module Gargantext.Database.Query.Table.Ngrams
)
where
-import Control.Arrow (returnA)
import Control.Lens ((^.))
-import Data.Text (Text)
+import Data.ByteString.Internal (ByteString)
import Data.Map (Map, fromList)
+import Data.Text (Text)
+import qualified Database.PostgreSQL.Simple as PGS
+
import Gargantext.Core.Types
-import Gargantext.Database.Admin.Types.Node (pgNodeId)
import Gargantext.Database.Prelude (runOpaQuery, Cmd)
-import Gargantext.Database.Schema.Ngrams
import Gargantext.Database.Prelude (runPGSQuery, formatPGSQuery)
import Gargantext.Database.Query.Table.NodeNodeNgrams
-import Gargantext.Prelude
+import Gargantext.Database.Schema.Ngrams
import Gargantext.Database.Schema.Prelude
-import Data.ByteString.Internal (ByteString)
-import qualified Database.PostgreSQL.Simple as PGS
+import Gargantext.Prelude
queryNgramsTable :: Query NgramsRead
queryNgramsTable = queryTable ngramsTable
_postNgrams :: CorpusId -> DocId -> [Text] -> Cmd err Int
_postNgrams = undefined
-_dbGetNgramsDb :: Cmd err [NgramsDb]
+_dbGetNgramsDb :: Cmd err [NgramsDB]
_dbGetNgramsDb = runOpaQuery queryNgramsTable
|]
-
-