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
158
Issues
158
List
Board
Labels
Milestones
Merge Requests
11
Merge Requests
11
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
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
,
_scst_remaining
=
Just
0
,
_scst_events
=
Just
[]
}
addContact
_uId
_nId
_p
logStatus
=
do
simuLogs
logStatus
10
...
...
src/Gargantext/Database/Action/Flow.hs
View file @
e5b415b8
...
...
@@ -32,6 +32,7 @@ module Gargantext.Database.Action.Flow -- (flowDatabase, ngrams2list)
,
flowCorpusFile
,
flowCorpus
,
flowAnnuaire
,
insertMasterDocs
,
getOrMkRoot
,
getOrMk_RootWithCorpus
...
...
@@ -226,25 +227,6 @@ flowCorpusUser l user corpusName ctype ids = do
-- _ <- mkAnnuaire rootUserId userId
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
,
FlowCorpus
a
...
...
@@ -292,6 +274,27 @@ insertMasterDocs c lang hs = do
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
=>
a
...
...
src/Gargantext/Database/Query/Table/Node/Document/Insert.hs
View file @
e5b415b8
...
...
@@ -283,9 +283,11 @@ instance ToNode HyperdataDocument where
m
=
fromMaybe
1
$
_hd_publication_month
h
d
=
fromMaybe
1
$
_hd_publication_day
h
-- TODO
-- TODO
better Node
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