Skip to content

Commit

Permalink
Merge pull request #45122 from nextcloud/techdebt/noid/remove-tempora…
Browse files Browse the repository at this point in the history
…ry-executeUpdate

fix(querybuilder): Remove temporary internal method executeUpdate()
  • Loading branch information
nickvergessen authored May 2, 2024
2 parents cf319df + 90ba7db commit e5f5f06
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions lib/private/DB/QueryBuilder/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -302,21 +302,6 @@ public function executeQuery(): IResult {
throw new \RuntimeException('Invalid return type for query');
}

/**
* Monkey-patched compatibility layer for apps that were adapted for Nextcloud 22 before
* the first beta, where executeStatement was named executeUpdate.
*
* Static analysis should catch those misuses, but until then let's try to keep things
* running.
*
* @internal
* @deprecated
* @todo drop ASAP
*/
public function executeUpdate(): int {
return $this->executeStatement();
}

public function executeStatement(): int {
if ($this->getType() === \Doctrine\DBAL\Query\QueryBuilder::SELECT) {
throw new \RuntimeException('Invalid query type, expected INSERT, DELETE or UPDATE statement');
Expand Down

0 comments on commit e5f5f06

Please sign in to comment.