Skip to content

Commit

Permalink
improve seafile db_api (#5910)
Browse files Browse the repository at this point in the history
  • Loading branch information
likesclever authored Jan 22, 2024
1 parent ae2f7a8 commit 03b11b6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions seahub/utils/db_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def get_repo_user_share_list(self, repo_id, org_id=''):
SELECT
s.repo_id, s.from_email, s.to_email, s.permission
FROM
{self.db_name}.SharedRepo s
`{self.db_name}`.`SharedRepo` s
WHERE
repo_id = '{repo_id}';
"""
Expand All @@ -51,7 +51,7 @@ def get_repo_user_share_list(self, repo_id, org_id=''):
SELECT
s.repo_id, s.from_email, s.to_email, s.permission
FROM
{self.db_name}.OrgSharedRepo s
`{self.db_name}`.`OrgSharedRepo` s
WHERE
repo_id = '{repo_id}';
"""
Expand Down Expand Up @@ -83,7 +83,7 @@ def get_repo_group_share_list(self, repo_id, org_id=''):
SELECT
s.repo_id, s.user_name, s.group_id, s.permission
FROM
{self.db_name}.RepoGroup s
`{self.db_name}`.`RepoGroup` s
WHERE
repo_id = '{repo_id}';
"""
Expand All @@ -92,7 +92,7 @@ def get_repo_group_share_list(self, repo_id, org_id=''):
SELECT
s.repo_id, s.owner, s.group_id, s.permission
FROM
{self.db_name}.OrgGroupRepo s
`{self.db_name}`.`OrgGroupRepo` s
WHERE
repo_id = '{repo_id}';
"""
Expand Down Expand Up @@ -123,7 +123,7 @@ def get_folder_user_share_list(self, repo_id, org_id=''):
SELECT
v.origin_repo, v.path, s.from_email, s.to_email, s.permission
FROM
{self.db_name}.SharedRepo s join {self.db_name}.VirtualRepo v
`{self.db_name}`.`SharedRepo` s join `{self.db_name}`.`VirtualRepo` v
ON
s.repo_id=v.repo_id
WHERE
Expand All @@ -134,7 +134,7 @@ def get_folder_user_share_list(self, repo_id, org_id=''):
SELECT
v.origin_repo, v.path, s.from_email, s.to_email, s.permission
FROM
{self.db_name}.OrgSharedRepo s join {self.db_name}.VirtualRepo v
`{self.db_name}`.`OrgSharedRepo` s join `{self.db_name}`.`VirtualRepo` v
ON
s.repo_id=v.repo_id
WHERE
Expand Down Expand Up @@ -168,7 +168,7 @@ def get_folder_group_share_list(self, repo_id, org_id=''):
SELECT
v.origin_repo, v.path, r.user_name, r.group_id, r.permission
FROM
{self.db_name}.RepoGroup r join {self.db_name}.VirtualRepo v
`{self.db_name}`.`RepoGroup` r join `{self.db_name}`.`VirtualRepo` v
ON
r.repo_id=v.repo_id
WHERE
Expand All @@ -179,7 +179,7 @@ def get_folder_group_share_list(self, repo_id, org_id=''):
SELECT
v.origin_repo, v.path, r.owner, r.group_id, r.permission
FROM
{self.db_name}.OrgGroupRepo r join {self.db_name}.VirtualRepo v
`{self.db_name}`.`OrgGroupRepo` r join `{self.db_name}`.`VirtualRepo` v
ON
r.repo_id=v.repo_id
WHERE
Expand Down

0 comments on commit 03b11b6

Please sign in to comment.