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
e5b415b8
Commit
e5b415b8
authored
Oct 01, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] flow Annuaire
parent
c4f159c2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
23 deletions
+26
-23
Contact.hs
src/Gargantext/API/Node/Contact.hs
+0
-2
Flow.hs
src/Gargantext/Database/Action/Flow.hs
+22
-19
Insert.hs
src/Gargantext/Database/Query/Table/Node/Document/Insert.hs
+4
-2
No files found.
src/Gargantext/API/Node/Contact.hs
View file @
e5b415b8
...
@@ -100,8 +100,6 @@ addContact u nId (AddContactParams fn ln) logStatus = do
...
@@ -100,8 +100,6 @@ addContact u nId (AddContactParams fn ln) logStatus = do
,
_scst_remaining
=
Just
0
,
_scst_remaining
=
Just
0
,
_scst_events
=
Just
[]
,
_scst_events
=
Just
[]
}
}
addContact
_uId
_nId
_p
logStatus
=
do
addContact
_uId
_nId
_p
logStatus
=
do
simuLogs
logStatus
10
simuLogs
logStatus
10
...
...
src/Gargantext/Database/Action/Flow.hs
View file @
e5b415b8
...
@@ -32,6 +32,7 @@ module Gargantext.Database.Action.Flow -- (flowDatabase, ngrams2list)
...
@@ -32,6 +32,7 @@ module Gargantext.Database.Action.Flow -- (flowDatabase, ngrams2list)
,
flowCorpusFile
,
flowCorpusFile
,
flowCorpus
,
flowCorpus
,
flowAnnuaire
,
flowAnnuaire
,
insertMasterDocs
,
getOrMkRoot
,
getOrMkRoot
,
getOrMk_RootWithCorpus
,
getOrMk_RootWithCorpus
...
@@ -226,25 +227,6 @@ flowCorpusUser l user corpusName ctype ids = do
...
@@ -226,25 +227,6 @@ flowCorpusUser l user corpusName ctype ids = do
-- _ <- mkAnnuaire rootUserId userId
-- _ <- mkAnnuaire rootUserId userId
pure
userCorpusId
pure
userCorpusId
-- TODO Type NodeDocumentUnicised
insertDocs
::
(
FlowCmdM
env
err
m
-- , FlowCorpus a
,
FlowInsertDB
a
)
=>
UserId
->
CorpusId
->
[
a
]
->
m
([
DocId
],
[
DocumentWithId
a
])
insertDocs
uId
cId
hs
=
do
let
docs
=
map
addUniqId
hs
newIds
<-
insertDb
uId
cId
docs
-- printDebug "newIds" newIds
let
newIds'
=
map
reId
newIds
documentsWithId
=
mergeData
(
toInserted
newIds
)
(
Map
.
fromList
$
map
viewUniqId'
docs
)
_
<-
Doc
.
add
cId
newIds'
pure
(
newIds'
,
documentsWithId
)
insertMasterDocs
::
(
FlowCmdM
env
err
m
insertMasterDocs
::
(
FlowCmdM
env
err
m
,
FlowCorpus
a
,
FlowCorpus
a
...
@@ -292,6 +274,27 @@ insertMasterDocs c lang hs = do
...
@@ -292,6 +274,27 @@ insertMasterDocs c lang hs = do
pure
ids'
pure
ids'
------------------------------------------------------------------------
------------------------------------------------------------------------
-- TODO Type NodeDocumentUnicised
insertDocs
::
(
FlowCmdM
env
err
m
-- , FlowCorpus a
,
FlowInsertDB
a
)
=>
UserId
->
CorpusId
->
[
a
]
->
m
([
DocId
],
[
DocumentWithId
a
])
insertDocs
uId
cId
hs
=
do
let
docs
=
map
addUniqId
hs
newIds
<-
insertDb
uId
cId
docs
-- printDebug "newIds" newIds
let
newIds'
=
map
reId
newIds
documentsWithId
=
mergeData
(
toInserted
newIds
)
(
Map
.
fromList
$
map
viewUniqId'
docs
)
_
<-
Doc
.
add
cId
newIds'
pure
(
newIds'
,
documentsWithId
)
------------------------------------------------------------------------
------------------------------------------------------------------------
viewUniqId'
::
UniqId
a
viewUniqId'
::
UniqId
a
=>
a
=>
a
...
...
src/Gargantext/Database/Query/Table/Node/Document/Insert.hs
View file @
e5b415b8
...
@@ -283,9 +283,11 @@ instance ToNode HyperdataDocument where
...
@@ -283,9 +283,11 @@ instance ToNode HyperdataDocument where
m
=
fromMaybe
1
$
_hd_publication_month
h
m
=
fromMaybe
1
$
_hd_publication_month
h
d
=
fromMaybe
1
$
_hd_publication_day
h
d
=
fromMaybe
1
$
_hd_publication_day
h
-- TODO
-- TODO
better Node
instance
ToNode
HyperdataContact
where
instance
ToNode
HyperdataContact
where
toNode
=
undefined
toNode
u
p
h
=
Node
0
Nothing
(
nodeTypeId
NodeContact
)
u
(
Just
p
)
"Contact"
date
h
where
date
=
jour
2020
01
01
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