diff options
author | Morris Jobke <hey@morrisjobke.de> | 2021-05-05 14:19:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-05 14:19:02 +0200 |
commit | 1089ad5d9e74a0cfd3b48ed1514f23be40fe6d45 (patch) | |
tree | 4be569379ff25316320da81671650895e5ca1a60 /lib/public | |
parent | 4d82a9446d5de3935577aa4ec437d4087392df72 (diff) | |
parent | 99f2fa73d1c386a6aa9c5464c576ac4a9d086ea4 (diff) | |
download | nextcloud-server-1089ad5d9e74a0cfd3b48ed1514f23be40fe6d45.tar.gz nextcloud-server-1089ad5d9e74a0cfd3b48ed1514f23be40fe6d45.zip |
Merge pull request #26877 from nextcloud/chore/query-builder-execute-statement
Rename IQueryBuilder::executeUpdate to IQueryBuilder::executeStatement
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/AppFramework/Db/QBMapper.php | 6 | ||||
-rw-r--r-- | lib/public/DB/QueryBuilder/IQueryBuilder.php | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/public/AppFramework/Db/QBMapper.php b/lib/public/AppFramework/Db/QBMapper.php index ac6520a9d03..f1450b5dd4c 100644 --- a/lib/public/AppFramework/Db/QBMapper.php +++ b/lib/public/AppFramework/Db/QBMapper.php @@ -101,7 +101,7 @@ abstract class QBMapper { ->where( $qb->expr()->eq('id', $qb->createNamedParameter($entity->getId(), $idType)) ); - $qb->executeUpdate(); + $qb->executeStatement(); return $entity; } @@ -132,7 +132,7 @@ abstract class QBMapper { $qb->setValue($column, $qb->createNamedParameter($value, $type)); } - $qb->executeUpdate(); + $qb->executeStatement(); if ($entity->id === null) { // When autoincrement is used id is always an int @@ -211,7 +211,7 @@ abstract class QBMapper { $qb->where( $qb->expr()->eq('id', $qb->createNamedParameter($id, $idType)) ); - $qb->executeUpdate(); + $qb->executeStatement(); return $entity; } diff --git a/lib/public/DB/QueryBuilder/IQueryBuilder.php b/lib/public/DB/QueryBuilder/IQueryBuilder.php index a4f3f3b10b0..fa861ed6ee8 100644 --- a/lib/public/DB/QueryBuilder/IQueryBuilder.php +++ b/lib/public/DB/QueryBuilder/IQueryBuilder.php @@ -149,7 +149,7 @@ interface IQueryBuilder { /** * Executes this query using the bound parameters and their types. * - * Uses {@see Connection::executeQuery} for select statements and {@see Connection::executeUpdate} + * Uses {@see Connection::executeQuery} for select statements and {@see Connection::executeStatement} * for insert, update and delete statements. * * Warning: until Nextcloud 20, this method could return a \Doctrine\DBAL\Driver\Statement but since @@ -175,15 +175,15 @@ interface IQueryBuilder { public function executeQuery(): IResult; /** - * Execute for insert, update and delete statements + * Execute insert, update and delete statements * - * @return int + * @return int the number of affected rows * @since 22.0.0 * * @throws Exception * @throws \RuntimeException in case of usage with select query */ - public function executeUpdate(): int; + public function executeStatement(): int; /** * Gets the complete SQL string formed by the current specifications of this QueryBuilder. |