mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #48361 from nextcloud/fix/querybuilder/oracle-indentifier-length
fix(QueryBuilder): Restrict identifier length to 30 characters due to Oracle limitations
This commit is contained in:
commit
771f67f108
1 changed files with 17 additions and 0 deletions
|
|
@ -206,6 +206,23 @@ class QueryBuilder implements IQueryBuilder {
|
|||
// }
|
||||
// }
|
||||
|
||||
$tooLongOutputColumns = [];
|
||||
foreach ($this->getOutputColumns() as $column) {
|
||||
if (strlen($column) > 30) {
|
||||
$tooLongOutputColumns[] = $column;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($tooLongOutputColumns)) {
|
||||
$exception = new QueryException('More than 30 characters for an output column name are not allowed on Oracle.');
|
||||
$this->logger->error($exception->getMessage(), [
|
||||
'query' => $this->getSQL(),
|
||||
'columns' => $tooLongOutputColumns,
|
||||
'app' => 'core',
|
||||
'exception' => $exception,
|
||||
]);
|
||||
}
|
||||
|
||||
$numberOfParameters = 0;
|
||||
$hasTooLargeArrayParameter = false;
|
||||
foreach ($this->getParameters() as $parameter) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue