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
145
Issues
145
List
Board
Labels
Milestones
Merge Requests
6
Merge Requests
6
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
9b1b869c
Commit
9b1b869c
authored
Aug 23, 2023
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
[MERGE] fix conflicts
parents
bb78d480
d85cdd3d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
New.hs
src/Gargantext/API/Node/Corpus/New.hs
+5
-4
UpdateOpaleye.hs
src/Gargantext/Database/Query/Table/Node/UpdateOpaleye.hs
+2
-2
No files found.
src/Gargantext/API/Node/Corpus/New.hs
View file @
9b1b869c
...
...
@@ -58,7 +58,6 @@ import Gargantext.Database.Admin.Types.Node (CorpusId, NodeType(..))
import
Gargantext.Database.Prelude
(
hasConfig
)
import
Gargantext.Database.Query.Table.Node
(
getNodeWith
)
import
Gargantext.Database.Query.Table.Node.UpdateOpaleye
(
updateHyperdata
)
import
Gargantext.Database.Query.Table.User
(
getUserPubmedAPIKey
)
import
Gargantext.Database.Schema.Node
(
node_hyperdata
)
import
Gargantext.Prelude
import
Gargantext.Prelude.Config
(
gc_max_docs_parsers
)
...
...
@@ -145,6 +144,7 @@ data WithQuery = WithQuery
,
_wq_lang
::
!
Lang
,
_wq_node_id
::
!
Int
,
_wq_flowListWith
::
!
FlowSocialListWith
,
_wq_pubmedAPIKey
::
!
(
Maybe
Text
)
}
deriving
(
Show
,
Eq
,
Generic
)
...
...
@@ -163,6 +163,7 @@ instance Arbitrary WithQuery where
<*>
arbitrary
<*>
arbitrary
<*>
arbitrary
<*>
arbitrary
------------------------------------------------------------------------
...
...
@@ -200,8 +201,8 @@ addToCorpusWithQuery user cid (WithQuery { _wq_query = q
,
_wq_databases
=
dbs
,
_wq_datafield
=
datafield
,
_wq_lang
=
l
,
_wq_flowListWith
=
flw
})
maybeLimit
jobHandle
=
do
,
_wq_flowListWith
=
flw
,
_wq_pubmedAPIKey
=
mPubmedAPIKey
})
maybeLimit
jobHandle
=
do
-- TODO ...
$
(
logLocM
)
DEBUG
$
T
.
pack
$
"(cid, dbs) "
<>
show
(
cid
,
dbs
)
$
(
logLocM
)
DEBUG
$
T
.
pack
$
"datafield "
<>
show
datafield
...
...
@@ -228,7 +229,7 @@ addToCorpusWithQuery user cid (WithQuery { _wq_query = q
-- if cid is root -> create corpus in Private
$
(
logLocM
)
DEBUG
$
T
.
pack
$
"getDataText with query: "
<>
show
q
let
db
=
database2origin
dbs
mPubmedAPIKey
<-
getUserPubmedAPIKey
user
--
mPubmedAPIKey <- getUserPubmedAPIKey user
-- printDebug "[addToCorpusWithQuery] mPubmedAPIKey" mPubmedAPIKey
eTxt
<-
getDataText
db
(
Multi
l
)
q
mPubmedAPIKey
maybeLimit
...
...
src/Gargantext/Database/Query/Table/Node/UpdateOpaleye.hs
View file @
9b1b869c
...
...
@@ -26,7 +26,7 @@ import Gargantext.Database.Prelude (Cmd, mkCmd, DBCmd)
import
Gargantext.Database.Query.Table.Node
import
Gargantext.Database.Query.Table.Node.Error
import
Debug.Trace
(
trace
)
--
import Debug.Trace (trace)
updateHyperdata
::
HyperdataC
a
=>
NodeId
->
a
->
DBCmd
err
Int64
updateHyperdata
i
h
=
mkCmd
$
\
c
->
putStrLn
"before runUpdate_"
>>
...
...
@@ -34,7 +34,7 @@ updateHyperdata i h = mkCmd $ \c -> putStrLn "before runUpdate_" >>
putStrLn
"after runUpdate_"
>>
return
res
updateHyperdataQuery
::
HyperdataC
a
=>
NodeId
->
a
->
Update
Int64
updateHyperdataQuery
i
h
=
seq
h'
$
trace
"updateHyperdataQuery: encoded JSON"
$
Update
updateHyperdataQuery
i
h
=
seq
h'
$
{- trace "updateHyperdataQuery: encoded JSON" $ -}
Update
{
uTable
=
nodeTable
,
uUpdateWith
=
updateEasy
(
\
(
Node
{
..
})
->
Node
{
_node_hyperdata
=
h'
,
..
}
...
...
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