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
47f77b50
Commit
47f77b50
authored
Jan 30, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev-sql-run-insert-deprecation-fix' into dev-merge
parents
fd4a7810
54ec4f4a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
Node.hs
src/Gargantext/Database/Schema/Node.hs
+3
-3
NodesNgramsRepo.hs
src/Gargantext/Database/Schema/NodesNgramsRepo.hs
+1
-1
User.hs
src/Gargantext/Database/Schema/User.hs
+3
-1
No files found.
src/Gargantext/Database/Schema/Node.hs
View file @
47f77b50
...
...
@@ -536,7 +536,7 @@ node nodeType name hyperData parentId userId = Node Nothing (pgInt4 typeId) (pgI
-------------------------------
insertNodes
::
[
NodeWrite
]
->
Cmd
err
Int64
insertNodes
ns
=
mkCmd
$
\
conn
->
runInsert
Many
conn
nodeTable
ns
insertNodes
ns
=
mkCmd
$
\
conn
->
runInsert
_
conn
$
Insert
nodeTable
ns
rCount
Nothing
insertNodesR
::
[
NodeWrite
]
->
Cmd
err
[
NodeId
]
insertNodesR
ns
=
mkCmd
$
\
conn
->
...
...
@@ -576,10 +576,10 @@ data Node' = Node' { _n_type :: NodeType
}
deriving
(
Show
)
mkNodes
::
[
NodeWrite
]
->
Cmd
err
Int64
mkNodes
ns
=
mkCmd
$
\
conn
->
runInsert
Many
conn
nodeTable
ns
mkNodes
ns
=
mkCmd
$
\
conn
->
runInsert
_
conn
$
Insert
nodeTable
ns
rCount
Nothing
mkNodeR
::
[
NodeWrite
]
->
Cmd
err
[
NodeId
]
mkNodeR
ns
=
mkCmd
$
\
conn
->
runInsert
ManyReturning
conn
nodeTable
ns
(
_node_id
)
mkNodeR
ns
=
mkCmd
$
\
conn
->
runInsert
_
conn
$
Insert
nodeTable
ns
(
rReturning
_node_id
)
Nothing
------------------------------------------------------------------------
...
...
src/Gargantext/Database/Schema/NodesNgramsRepo.hs
View file @
47f77b50
...
...
@@ -80,7 +80,7 @@ selectPatches = proc () -> do
insertRepos
::
[
NgramsStatePatch
]
->
Cmd
err
Int64
insertRepos
ns
=
mkCmd
$
\
conn
->
runInsert
Many
conn
repoTable
(
toWrite
ns
)
insertRepos
ns
=
mkCmd
$
\
conn
->
runInsert
_
conn
$
Insert
repoTable
(
toWrite
ns
)
rCount
Nothing
where
toWrite
::
[
NgramsStatePatch
]
->
[
RepoDbWrite
]
toWrite
=
undefined
...
...
src/Gargantext/Database/Schema/User.hs
View file @
47f77b50
...
...
@@ -115,7 +115,9 @@ userTable = Table "auth_user" (pUser User { user_id = optional "id"
-- TODO: on conflict, nice message
insertUsers
::
[
UserWrite
]
->
Cmd
err
Int64
insertUsers
us
=
mkCmd
$
\
c
->
runInsertMany
c
userTable
us
insertUsers
us
=
mkCmd
$
\
c
->
runInsert_
c
insert
where
insert
=
Insert
userTable
us
rCount
Nothing
gargantextUser
::
Username
->
UserWrite
...
...
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