Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
157
Issues
157
List
Board
Labels
Milestones
Merge Requests
9
Merge Requests
9
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
80b4fc27
Commit
80b4fc27
authored
Feb 06, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] Removing selectNodeWithParentId function.
parent
dddedf05
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
Node.hs
src/Data/Gargantext/Database/Node.hs
+5
-6
Server.hs
src/Data/Gargantext/Server.hs
+1
-1
No files found.
src/Data/Gargantext/Database/Node.hs
View file @
80b4fc27
...
...
@@ -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
$
selectNode
s
WithParentID
n
selectNodeWithParentID
::
Int
->
Query
NodeRead
selectNodeWithParentID
n
=
proc
()
->
do
selectNode
s
WithParentID
::
Int
->
Query
NodeRead
selectNode
s
WithParentID
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
(
selectNode
s
WithParentID
n
)
-- NP check type
getProjectCorpora
::
Connection
->
Int
->
IO
[
Corpus
]
getProjectCorpora
conn
node_id
=
do
runQuery
conn
$
selectNodeWithParentID
node_id
runQuery
conn
$
selectNode
s
WithParentID
node_id
src/Data/Gargantext/Server.hs
View file @
80b4fc27
...
...
@@ -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)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment