aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Files
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2024-02-06 14:31:21 +0100
committerRobin Appelman <robin@icewind.nl>2024-02-15 17:55:44 +0100
commit1c87cee5ad8754aec87cb1749f5a495cd8d80961 (patch)
tree9165809db72c4767c1ff93dd2c1844f65a315dc3 /tests/lib/Files
parent63ffaab95ec7a893ec510e7fde802f47ba4a8889 (diff)
downloadnextcloud-server-1c87cee5ad8754aec87cb1749f5a495cd8d80961.tar.gz
nextcloud-server-1c87cee5ad8754aec87cb1749f5a495cd8d80961.zip
add extra flatten step to improve "or eq" -> "in" optimization
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests/lib/Files')
-rw-r--r--tests/lib/Files/Search/QueryOptimizer/OrEqualsToInTest.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/lib/Files/Search/QueryOptimizer/OrEqualsToInTest.php b/tests/lib/Files/Search/QueryOptimizer/OrEqualsToInTest.php
index 23b2a6ca07a..3d3160079cd 100644
--- a/tests/lib/Files/Search/QueryOptimizer/OrEqualsToInTest.php
+++ b/tests/lib/Files/Search/QueryOptimizer/OrEqualsToInTest.php
@@ -83,16 +83,16 @@ class OrEqualsToInTest extends TestCase {
ISearchBinaryOperator::OPERATOR_OR,
[
new SearchComparison(ISearchComparison::COMPARE_EQUAL, "path", "foo"),
+ new SearchComparison(ISearchComparison::COMPARE_LIKE, "path", "foo%"),
new SearchComparison(ISearchComparison::COMPARE_EQUAL, "path", "bar"),
- new SearchComparison(ISearchComparison::COMPARE_LIKE, "path", "asd%"),
]
);
- $this->assertEquals('(path eq "foo" or path eq "bar" or path like "asd%")', $operator->__toString());
+ $this->assertEquals('(path eq "foo" or path like "foo%" or path eq "bar")', $operator->__toString());
$this->optimizer->processOperator($operator);
$this->simplifier->processOperator($operator);
- $this->assertEquals('(path in ["foo","bar"] or path like "asd%")', $operator->__toString());
+ $this->assertEquals('(path in ["foo","bar"] or path like "foo%")', $operator->__toString());
}
public function testOrsInside() {