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
2afb0b16
Commit
2afb0b16
authored
Jan 03, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Database] NodeNgramsNgrams minor change.
parent
4f736fc9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
NodeNgramsNgrams.hs
src/Gargantext/Database/Schema/NodeNgramsNgrams.hs
+3
-1
No files found.
src/Gargantext/Database/Schema/NodeNgramsNgrams.hs
View file @
2afb0b16
...
...
@@ -124,8 +124,10 @@ data Action = Del | Add
type
NgramsParent
=
Text
type
NgramsChild
=
Text
ngramsGroup
::
Action
->
[(
ListId
,
NgramsParent
,
NgramsChild
,
Maybe
Double
)]
->
Cmd
err
[
Int
]
ngramsGroup
_
[]
=
pure
[]
ngramsGroup
action
ngs
=
runNodeNgramsNgrams
q
ngs
where
q
=
case
action
of
...
...
@@ -133,7 +135,7 @@ ngramsGroup action ngs = runNodeNgramsNgrams q ngs
Add
->
queryInsertNodeNgramsNgrams
runNodeNgramsNgrams
::
PGS
.
Query
->
[(
Int
,
NgramsParent
,
NgramsChild
,
Maybe
Double
)]
->
Cmd
err
[
Int
]
runNodeNgramsNgrams
::
PGS
.
Query
->
[(
ListId
,
NgramsParent
,
NgramsChild
,
Maybe
Double
)]
->
Cmd
err
[
Int
]
runNodeNgramsNgrams
q
ngs
=
map
(
\
(
PGS
.
Only
a
)
->
a
)
<$>
runPGSQuery
q
(
PGS
.
Only
$
Values
fields
ngs'
)
where
ngs'
=
map
(
\
(
n
,
ng1
,
ng2
,
w
)
->
(
n
,
ng1
,
ng2
,
maybe
0
identity
w
))
ngs
...
...
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