Commit 4f736fc9 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[Database] NodeNgramsNgrams cosmetics.

parent 83f88386
Pipeline #82 canceled with stage
......@@ -41,6 +41,7 @@ import Data.Profunctor.Product.TH (makeAdaptorAndInstance)
import Database.PostgreSQL.Simple.SqlQQ (sql)
import Database.PostgreSQL.Simple.Types (Values(..), QualifiedIdentifier(..))
import Gargantext.Database.Utils (Cmd, runOpaQuery, runPGSQuery, connection)
import Gargantext.Core.Types.Main (ListId)
import Gargantext.Prelude
import Opaleye
import qualified Database.PostgreSQL.Simple as PGS
......@@ -52,7 +53,6 @@ data NodeNgramsNgramsPoly node_id ngram1_id ngram2_id weight =
, _nng_Weight :: weight
} deriving (Show)
type NodeNgramsNgramsWrite =
NodeNgramsNgramsPoly (Column PGInt4 )
(Column PGInt4 )
......@@ -124,9 +124,9 @@ data Action = Del | Add
type NgramsParent = Text
type NgramsChild = Text
ngramsGroup' :: Action -> [(Int, NgramsParent, NgramsChild, Maybe Double)]
ngramsGroup :: Action -> [(ListId, NgramsParent, NgramsChild, Maybe Double)]
-> Cmd err [Int]
ngramsGroup' action ngs = runNodeNgramsNgrams q ngs
ngramsGroup action ngs = runNodeNgramsNgrams q ngs
where
q = case action of
Del -> queryDelNodeNgramsNgrams
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment