Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DBRepo
Manage
Activity
Members
Labels
Plan
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FAIR Data Austria DB Repository
DBRepo
Commits
76e8c3a7
Commit
76e8c3a7
authored
3 years ago
by
Moritz Staudinger
Browse files
Options
Downloads
Patches
Plain Diff
set id correctly
parent
60fdf6dc
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!81
New stable release
,
!43
Merge dev to master
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fda-query-service/services/src/main/java/at/tuwien/service/impl/StoreServiceImpl.java
+5
-12
5 additions, 12 deletions
...rc/main/java/at/tuwien/service/impl/StoreServiceImpl.java
with
5 additions
and
12 deletions
fda-query-service/services/src/main/java/at/tuwien/service/impl/StoreServiceImpl.java
+
5
−
12
View file @
76e8c3a7
...
@@ -148,7 +148,7 @@ public class StoreServiceImpl extends HibernateConnector implements StoreService
...
@@ -148,7 +148,7 @@ public class StoreServiceImpl extends HibernateConnector implements StoreService
@Override
@Override
@Transactional
(
readOnly
=
true
)
@Transactional
(
readOnly
=
true
)
public
Query
update
(
Long
containerId
,
Long
databaseId
,
QueryResultDto
result
,
Long
resultNumber
,
Query
metadata
)
public
Query
update
(
Long
containerId
,
Long
databaseId
,
QueryResultDto
result
,
Long
resultNumber
,
Query
query
)
throws
QueryStoreException
,
DatabaseNotFoundException
,
ImageNotSupportedException
,
throws
QueryStoreException
,
DatabaseNotFoundException
,
ImageNotSupportedException
,
ContainerNotFoundException
{
ContainerNotFoundException
{
/* find */
/* find */
...
@@ -158,21 +158,14 @@ public class StoreServiceImpl extends HibernateConnector implements StoreService
...
@@ -158,21 +158,14 @@ public class StoreServiceImpl extends HibernateConnector implements StoreService
throw
new
ImageNotSupportedException
(
"Currently only MariaDB is supported"
);
throw
new
ImageNotSupportedException
(
"Currently only MariaDB is supported"
);
}
}
log
.
debug
(
"Update database id {}, metadata {}"
,
databaseId
,
metadata
);
log
.
debug
(
"Update database id {}, metadata {}"
,
databaseId
,
query
);
/* save */
/* save */
final
SessionFactory
factory
=
getSessionFactory
(
database
,
true
);
final
SessionFactory
factory
=
getSessionFactory
(
database
,
true
);
final
Session
session
=
factory
.
openSession
();
final
Session
session
=
factory
.
openSession
();
final
Transaction
transaction
=
session
.
beginTransaction
();
final
Transaction
transaction
=
session
.
beginTransaction
();
final
Query
query
=
Query
.
builder
()
query
.
setQueryHash
(
DigestUtils
.
sha256Hex
(
query
.
getQuery
()));
.
cid
(
containerId
)
query
.
setResultNumber
(
resultNumber
);
.
dbid
(
databaseId
)
query
.
setResultHash
(
storeMapper
.
queryResultDtoToString
(
result
));
.
query
(
metadata
.
getQuery
())
.
queryNormalized
(
metadata
.
getQuery
())
.
queryHash
(
DigestUtils
.
sha256Hex
(
metadata
.
getQuery
()))
.
resultNumber
(
resultNumber
)
.
resultHash
(
storeMapper
.
queryResultDtoToString
(
result
))
.
execution
(
metadata
.
getExecution
())
.
build
();
session
.
update
(
query
);
session
.
update
(
query
);
transaction
.
commit
();
transaction
.
commit
();
/* store the result in the query store */
/* store the result in the query store */
...
...
This diff is collapsed.
Click to expand it.
Moritz Staudinger
@mstaudinger
mentioned in commit
b5bc9863
·
3 years ago
mentioned in commit
b5bc9863
mentioned in commit b5bc98634a7f73f2d6c53ade28be1fc41cb4cb1f
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment