Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
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()->like('owncloud_name', $qb->createNamedParameter(str_repeat('_', 65) . '%'), Types::STRING));
+ ->where($qb->expr()->gt($qb->createFunction($lengthExpr), '64', IQueryBuilder::PARAM_INT));
return $qb;
}