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
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
Grégoire Locqueville
haskell-gargantext
Commits
4230dbce
Commit
4230dbce
authored
Oct 20, 2022
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] sql query
parent
1e1b8b61
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
NodeStory.hs
src/Gargantext/Core/NodeStory.hs
+4
-2
No files found.
src/Gargantext/Core/NodeStory.hs
View file @
4230dbce
...
@@ -454,8 +454,10 @@ insertArchiveList c nodeId a = do
...
@@ -454,8 +454,10 @@ insertArchiveList c nodeId a = do
pure
()
pure
()
where
where
query
::
PGS
.
Query
query
::
PGS
.
Query
query
=
[
sql
|
INSERT INTO node_stories(node_id, version, ngrams_type_id, ngrams_id, ngrams_repo_element)
query
=
[
sql
|
WITH s as (SELECT ? as sid, ? sversion, ? sngrams_type_id, ngrams.id as sngrams_id, ?::jsonb as srepo FROM ngrams WHERE terms = ?)
SELECT * WHERE EXISTS (SELECT ?, ?, ?, ngrams.id, ? FROM ngrams WHERE terms = ?)
|]
INSERT INTO node_stories(node_id, version, ngrams_type_id, ngrams_id, ngrams_repo_element)
SELECT s.sid, s.sversion, s.sngrams_type_id, s.sngrams_id, s.srepo from s s join nodes n on s.sid = n.id
|]
deleteArchiveList
::
PGS
.
Connection
->
NodeId
->
ArchiveList
->
IO
()
deleteArchiveList
::
PGS
.
Connection
->
NodeId
->
ArchiveList
->
IO
()
deleteArchiveList
c
nodeId
a
=
do
deleteArchiveList
c
nodeId
a
=
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