aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Cache/CacheQueryBuilder.php
diff options
context:
space:
mode:
authorSijmen Schoon <me@sijmenschoon.nl>2021-10-17 20:52:38 +0200
committerSijmen Schoon <me@sijmenschoon.nl>2021-10-17 20:57:28 +0200
commit34600c78bbda8fa232f474936ccbebbfd97c1209 (patch)
treeb9c87fb598531d58895fa11aa3441b8a289fae12 /lib/private/Files/Cache/CacheQueryBuilder.php
parentc959bf2b426aa2e5ad53892d9685b9c33261aadf (diff)
downloadnextcloud-server-34600c78bbda8fa232f474936ccbebbfd97c1209.tar.gz
nextcloud-server-34600c78bbda8fa232f474936ccbebbfd97c1209.zip
Move query outside the loop and reduce chunk size to 1000
This involved changing CacheQueryBuilder\whereParentIn to take a parameter name, renaming the function accordingly. Signed-off-by: Sijmen Schoon <me@sijmenschoon.nl>
Diffstat (limited to 'lib/private/Files/Cache/CacheQueryBuilder.php')
-rw-r--r--lib/private/Files/Cache/CacheQueryBuilder.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Files/Cache/CacheQueryBuilder.php b/lib/private/Files/Cache/CacheQueryBuilder.php
index 774691ebc31..87a1f940f20 100644
--- a/lib/private/Files/Cache/CacheQueryBuilder.php
+++ b/lib/private/Files/Cache/CacheQueryBuilder.php
@@ -91,7 +91,7 @@ class CacheQueryBuilder extends QueryBuilder {
return $this;
}
- public function whereParentIn(array $parents) {
+ public function whereParentInParameter(string $parameter) {
$alias = $this->alias;
if ($alias) {
$alias .= '.';
@@ -99,7 +99,7 @@ class CacheQueryBuilder extends QueryBuilder {
$alias = '';
}
- $this->andWhere($this->expr()->in("{$alias}parent", $this->createNamedParameter($parents, IQueryBuilder::PARAM_INT_ARRAY)));
+ $this->andWhere($this->expr()->in("{$alias}parent", $this->createParameter($parameter)));
return $this;
}