Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vospace-transfer-service
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VOSpace INAF
vospace-transfer-service
Commits
01a20be4
Commit
01a20be4
authored
Oct 5, 2021
by
Cristiano Urban
Browse files
Options
Downloads
Patches
Plain Diff
Removed views from queries.
Signed-off-by:
Cristiano Urban
<
cristiano.urban@inaf.it
>
parent
7c0f22df
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
transfer_service/db_connector.py
+7
-10
7 additions, 10 deletions
transfer_service/db_connector.py
with
7 additions
and
10 deletions
transfer_service/db_connector.py
+
7
−
10
View file @
01a20be4
...
...
@@ -80,7 +80,7 @@ class DbConnector(object):
try
:
conn
=
self
.
getConnection
()
cursor
=
conn
.
cursor
(
cursor_factory
=
RealDictCursor
)
cursor
.
execute
(
"
SELECT
* FROM node_vos_path WHERE
vos_path
=
%s;
"
,
(
vospacePath
,))
cursor
.
execute
(
"
SELECT
id_from_
vos_path
(
%s
)
;
"
,
(
vospacePath
,))
result
=
cursor
.
fetchall
()
cursor
.
close
()
except
Exception
:
...
...
@@ -102,9 +102,8 @@ class DbConnector(object):
cursor
=
conn
.
cursor
(
cursor_factory
=
RealDictCursor
)
cursor
.
execute
(
"""
SELECT creator_id
FROM node_vos_path nvp
JOIN node n ON nvp.node_id = n.node_id
WHERE vos_path = %s;
FROM node
WHERE node_id = id_from_vos_path(%s);
"""
,
(
vospacePath
,))
result
=
cursor
.
fetchall
()
...
...
@@ -125,9 +124,8 @@ class DbConnector(object):
cursor
=
conn
.
cursor
(
cursor_factory
=
RealDictCursor
)
cursor
.
execute
(
"""
SELECT unnest(group_read) as group_read
FROM node_vos_path nvp
JOIN node n ON nvp.node_id = n.node_id
WHERE vos_path = %s;
FROM node
WHERE node_id = id_from_vos_path(%s);
"""
,
(
vospacePath
,))
result
=
cursor
.
fetchall
()
...
...
@@ -150,9 +148,8 @@ class DbConnector(object):
cursor
=
conn
.
cursor
(
cursor_factory
=
RealDictCursor
)
cursor
.
execute
(
"""
SELECT unnest(group_write) as group_write
FROM node_vos_path nvp
JOIN node n ON nvp.node_id = n.node_id
WHERE vos_path = %s;
FROM node
WHERE node_id = id_from_vos_path(%s);
"""
,
(
vospacePath
,))
result
=
cursor
.
fetchall
()
...
...
This diff is collapsed.
Click to expand it.
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
sign in
to comment