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
147
Issues
147
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
4f736fc9
Commit
4f736fc9
authored
Jan 03, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Database] NodeNgramsNgrams cosmetics.
parent
83f88386
Pipeline
#82
canceled with stage
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
NodeNgramsNgrams.hs
src/Gargantext/Database/Schema/NodeNgramsNgrams.hs
+3
-3
No files found.
src/Gargantext/Database/Schema/NodeNgramsNgrams.hs
View file @
4f736fc9
...
...
@@ -41,6 +41,7 @@ import Data.Profunctor.Product.TH (makeAdaptorAndInstance)
import
Database.PostgreSQL.Simple.SqlQQ
(
sql
)
import
Database.PostgreSQL.Simple.Types
(
Values
(
..
),
QualifiedIdentifier
(
..
))
import
Gargantext.Database.Utils
(
Cmd
,
runOpaQuery
,
runPGSQuery
,
connection
)
import
Gargantext.Core.Types.Main
(
ListId
)
import
Gargantext.Prelude
import
Opaleye
import
qualified
Database.PostgreSQL.Simple
as
PGS
...
...
@@ -52,7 +53,6 @@ data NodeNgramsNgramsPoly node_id ngram1_id ngram2_id weight =
,
_nng_Weight
::
weight
}
deriving
(
Show
)
type
NodeNgramsNgramsWrite
=
NodeNgramsNgramsPoly
(
Column
PGInt4
)
(
Column
PGInt4
)
...
...
@@ -124,9 +124,9 @@ data Action = Del | Add
type
NgramsParent
=
Text
type
NgramsChild
=
Text
ngramsGroup
'
::
Action
->
[(
Int
,
NgramsParent
,
NgramsChild
,
Maybe
Double
)]
ngramsGroup
::
Action
->
[(
ListId
,
NgramsParent
,
NgramsChild
,
Maybe
Double
)]
->
Cmd
err
[
Int
]
ngramsGroup
'
action
ngs
=
runNodeNgramsNgrams
q
ngs
ngramsGroup
action
ngs
=
runNodeNgramsNgrams
q
ngs
where
q
=
case
action
of
Del
->
queryDelNodeNgramsNgrams
...
...
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