Commit 80b4fc27 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] Removing selectNodeWithParentId function.

parent dddedf05
......@@ -120,10 +120,10 @@ runGetNodes = runQuery
-- NP check type
getNodesWithParentId :: Connection -> Int -> IO [Node Value]
getNodesWithParentId conn n = runQuery conn $ selectNodeWithParentID n
getNodesWithParentId conn n = runQuery conn $ selectNodesWithParentID n
selectNodeWithParentID :: Int -> Query NodeRead
selectNodeWithParentID n = proc () -> do
selectNodesWithParentID :: Int -> Query NodeRead
selectNodesWithParentID n = proc () -> do
row@(Node _ _ _ parent_id _ _ _) <- queryNodeTable -< ()
restrict -< if n > 0
then
......@@ -138,7 +138,6 @@ queryNodeTable = queryTable nodeTable
selectNodesWithType :: Column PGInt4 -> Query NodeRead
selectNodesWithType type_id = proc () -> do
row@(Node _ tn _ _ _ _ _) <- queryNodeTable -< ()
......@@ -156,9 +155,9 @@ getNodesWithType conn type_id = do
-- NP check type
getCorpusDocument :: Connection -> Int -> IO [Document]
getCorpusDocument conn n = runQuery conn (selectNodeWithParentID n)
getCorpusDocument conn n = runQuery conn (selectNodesWithParentID n)
-- NP check type
getProjectCorpora :: Connection -> Int -> IO [Corpus]
getProjectCorpora conn node_id = do
runQuery conn $ selectNodeWithParentID node_id
runQuery conn $ selectNodesWithParentID node_id
......@@ -20,7 +20,7 @@ import Database.PostgreSQL.Simple (Connection, connect)
import Opaleye
import Data.Gargantext.Types.Main (Node, NodeId)
import Data.Gargantext.Database.Node (getNodesWithParentId, getNode, getNodesWithType)
import Data.Gargantext.Database.Node (getNodesWithParentId, getNode)
import Data.Gargantext.Database.Private (infoGargandb)
-- | TODO, use MOCK feature of Servant to generate fake data (for tests)
......
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