Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable28] fix(QueryBuilder): Restrict identifier length to 30 characters due to Oracle limitations #48389

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions lib/private/DB/QueryBuilder/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,23 @@
}
}

$tooLongOutputColumns = [];
foreach ($this->getOutputColumns() as $column) {

Check failure on line 253 in lib/private/DB/QueryBuilder/QueryBuilder.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

UndefinedMethod

lib/private/DB/QueryBuilder/QueryBuilder.php:253:19: UndefinedMethod: Method OC\DB\QueryBuilder\QueryBuilder::getOutputColumns does not exist (see https://psalm.dev/022)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function does not exist in 28

Check failure

Code scanning / Psalm

UndefinedMethod Error

Method OC\DB\QueryBuilder\QueryBuilder::getOutputColumns does not exist
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) {
Expand Down
Loading