Skip to content

Commit

Permalink
Update QueryBuilder methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Albrecht Köhnlein committed Nov 13, 2024
1 parent 250f564 commit 115a71d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions Classes/Command/AbstractTableCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,16 @@ protected function getColumnNames(): array
$result = $this->queryBuilderForTable($table)
->select('*')
->from($table)
->execute()
->fetch();
->executeQuery()
->fetchAssociative();
if ($result) {
$columnNames = \array_keys($result);
$this->tableColumnCache[$table] = $columnNames;
} else {
$result = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable($table);
$result = $result->getSchemaManager()->listTableColumns($table);
foreach ($result as $columnName => $columnProperties) {
$columnNames[] = $columnName;
$result = $result->getSchemaInformation()->introspectTable($table)->getColumns();
foreach ($result as $columnProperties) {
$columnNames[] = $columnProperties->getName();
}
$this->tableColumnCache[$table] = $columnNames;
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/Command/ExportTableCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ protected function exportTable(SymfonyStyle $io): void
)
)
)
->execute();
->executeQuery();
$usergroupsTitles = [];
foreach ($usergroups as $singleUserGroup) {
$usergroupsTitles[] = $singleUserGroup['title'];
Expand Down
2 changes: 1 addition & 1 deletion Classes/Command/ImportTableCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ protected function importData(SymfonyStyle $io): void
)
);
}
$row = $row->where(...$whereClause)->execute()->fetch();
$row = $row->where(...$whereClause)->executeQuery()->fetchAssociative();
}
if ($row) {
// Update row as the matched row exists in the table
Expand Down

0 comments on commit 115a71d

Please sign in to comment.