diff options
author | Robin Appelman <robin@icewind.nl> | 2022-06-20 17:53:31 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2022-08-16 12:07:13 +0200 |
commit | 6e0123a1d0343b6b850ef6e3b341acf082fa0dce (patch) | |
tree | 06b4c66ede7fd3859ee02dd74ea4b7a8d60b46a2 /tests | |
parent | 9b52663a81ef4db0aa458ed6b34dfaab872e3243 (diff) | |
download | nextcloud-server-6e0123a1d0343b6b850ef6e3b341acf082fa0dce.tar.gz nextcloud-server-6e0123a1d0343b6b850ef6e3b341acf082fa0dce.zip |
Revert "add case statement to sql function builder"
This reverts commit 2a68819a67045d87a369a8a6413f153b3b2bea5f.
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/DB/QueryBuilder/FunctionBuilderTest.php | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/tests/lib/DB/QueryBuilder/FunctionBuilderTest.php b/tests/lib/DB/QueryBuilder/FunctionBuilderTest.php index 0ea6e69c956..08392b09d8d 100644 --- a/tests/lib/DB/QueryBuilder/FunctionBuilderTest.php +++ b/tests/lib/DB/QueryBuilder/FunctionBuilderTest.php @@ -501,21 +501,4 @@ class FunctionBuilderTest extends TestCase { $result->closeCursor(); $this->assertEquals(1, $row); } - - public function testCase() { - $query = $this->connection->getQueryBuilder(); - - $query->select($query->func()->case([ - ['when' => $query->expr()->gt($query->expr()->literal(1, IQueryBuilder::PARAM_INT), $query->expr()->literal(2, IQueryBuilder::PARAM_INT)), 'then' => $query->expr()->literal('first')], - ['when' => $query->expr()->lt($query->expr()->literal(1, IQueryBuilder::PARAM_INT), $query->expr()->literal(2, IQueryBuilder::PARAM_INT)), 'then' => $query->expr()->literal('second')], - ['when' => $query->expr()->eq($query->expr()->literal(1, IQueryBuilder::PARAM_INT), $query->expr()->literal(2, IQueryBuilder::PARAM_INT)), 'then' => $query->expr()->literal('third')], - ], $query->createNamedParameter('else'))); - $query->from('appconfig') - ->setMaxResults(1); - - $result = $query->execute(); - $row = $result->fetchOne(); - $result->closeCursor(); - $this->assertEquals('second', $row); - } } |