goto-switcher: reduce query data to only required attributes for speedups.
marcink -
r4152:beb1dad7 default
Not Reviewed
Show More
Add another comment
TODOs: 0 unresolved 0 Resolved
COMMENTS: 0 General 0 Inline
@@ -113,7 +113,12
113 ['repository.read', 'repository.write', 'repository.admin'],
113 ['repository.read', 'repository.write', 'repository.admin'],
114 cache=False, name_filter=name_contains) or [-1]
114 cache=False, name_filter=name_contains) or [-1]
115
115
116 query = Repository.query()\
116 query = Session().query(
117 Repository.repo_name,
118 Repository.repo_id,
119 Repository.repo_type,
120 Repository.private,
121 )\
117 .filter(Repository.archived.isnot(true()))\
122 .filter(Repository.archived.isnot(true()))\
118 .filter(or_(
123 .filter(or_(
119 # generate multiple IN to fix limitation problems
124 # generate multiple IN to fix limitation problems
@@ -159,7 +164,10
159 ['group.read', 'group.write', 'group.admin'],
164 ['group.read', 'group.write', 'group.admin'],
160 cache=False, name_filter=name_contains) or [-1]
165 cache=False, name_filter=name_contains) or [-1]
161
166
162 query = RepoGroup.query()\
167 query = Session().query(
168 RepoGroup.group_id,
169 RepoGroup.group_name,
170 )\
163 .filter(or_(
171 .filter(or_(
164 # generate multiple IN to fix limitation problems
172 # generate multiple IN to fix limitation problems
165 *in_filter_generator(RepoGroup.group_id, allowed_ids)
173 *in_filter_generator(RepoGroup.group_id, allowed_ids)
Comments 0
You need to be logged in to leave comments. Login now