Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-03-24 18:17:37 +0300
committerVincent Petry (Rebase PR Action) <PVince81@users.noreply.github.com>2022-03-24 23:35:02 +0300
commitefebbacca4d5a5045271eeecd209c8a0b4253598 (patch)
treee9e7d33b8ca9ec8f9fb5c287e31f317d2c94435e /apps/user_ldap
parent7dc3eb1e9e9a2cf6b52dc17986b4bbca395f0998 (diff)
Add octetLength and charLength to function builder, and tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/lib/Migration/Version1120Date20210917155206.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/Migration/Version1120Date20210917155206.php b/apps/user_ldap/lib/Migration/Version1120Date20210917155206.php
index 87a8f07fbe1..bca390441d7 100644
--- a/apps/user_ldap/lib/Migration/Version1120Date20210917155206.php
+++ b/apps/user_ldap/lib/Migration/Version1120Date20210917155206.php
@@ -127,10 +127,9 @@ class Version1120Date20210917155206 extends SimpleMigrationStep {
protected function getSelectQuery(string $table): IQueryBuilder {
$qb = $this->dbc->getQueryBuilder();
- $lengthExpr = $this->dbc->getDatabasePlatform()->getLengthExpression('owncloud_name');
$qb->select('owncloud_name', 'directory_uuid')
->from($table)
- ->where($qb->expr()->gt($qb->createFunction($lengthExpr), '64', IQueryBuilder::PARAM_INT));
+ ->where($qb->expr()->gt($qb->func()->octetLength('owncloud_name'), '64', IQueryBuilder::PARAM_INT));
return $qb;
}