Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Przemyslaw Kaminski
haskell-gargantext
Commits
affb8b80
Commit
affb8b80
authored
Jul 05, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] cleaning Database.Node + clearer error message.
parent
f730b1b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
Node.hs
src/Gargantext/Database/Node.hs
+2
-5
No files found.
src/Gargantext/Database/Node.hs
View file @
affb8b80
...
@@ -221,14 +221,11 @@ selectNodesWithType type_id = proc () -> do
...
@@ -221,14 +221,11 @@ selectNodesWithType type_id = proc () -> do
restrict
-<
tn
.==
type_id
restrict
-<
tn
.==
type_id
returnA
-<
row
returnA
-<
row
getNode'
::
Connection
->
Int
->
IO
(
Node
Value
)
getNode'
c
id
=
do
fromMaybe
(
error
"TODO: 404"
)
.
headMay
<$>
runQuery
c
(
limit
1
$
selectNode
(
pgInt4
id
))
getNode
::
Connection
->
Int
->
IO
(
Node
Value
)
getNode
::
Connection
->
Int
->
IO
(
Node
Value
)
getNode
conn
id
=
do
getNode
conn
id
=
do
fromMaybe
(
error
"TODO: 404"
)
.
headMay
<$>
runQuery
conn
(
limit
1
$
selectNode
(
pgInt4
id
))
fromMaybe
(
error
$
"Node does node existe: "
<>
show
id
)
.
headMay
<$>
runQuery
conn
(
limit
1
$
selectNode
(
pgInt4
id
))
getNodesWithType
::
Connection
->
Column
PGInt4
->
IO
[
Node
HyperdataDocument
]
getNodesWithType
::
Connection
->
Column
PGInt4
->
IO
[
Node
HyperdataDocument
]
getNodesWithType
conn
type_id
=
do
getNodesWithType
conn
type_id
=
do
...
...
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