diff --git a/lib/Command/CirclesTest.php b/lib/Command/CirclesTest.php index 627b9aff4..d3b5135a3 100644 --- a/lib/Command/CirclesTest.php +++ b/lib/Command/CirclesTest.php @@ -286,7 +286,7 @@ function (Member $member): string { // $circlesQueryHelper->addCircleDetails('test', 'shared_to'); // // $items = []; - // $cursor = $qb->execute(); + // $cursor = $qb->executeQuery(); // while ($row = $cursor->fetch()) { // try { // $items[] = [ diff --git a/lib/Command/MigrateCustomGroups.php b/lib/Command/MigrateCustomGroups.php index daf78e5ce..1bda9b893 100644 --- a/lib/Command/MigrateCustomGroups.php +++ b/lib/Command/MigrateCustomGroups.php @@ -231,7 +231,7 @@ private function getSharedIds(string $groupUri): array { ->where($select->expr()->eq('share_type', $select->createNamedParameter(IShare::TYPE_GROUP))); $shareIds = []; - $result = $select->execute(); + $result = $select->executeQuery(); while ($row = $result->fetch()) { $with = $row['share_with']; if (!str_starts_with($with, 'customgroup_') diff --git a/lib/Db/AccountsRequest.php b/lib/Db/AccountsRequest.php index 77164b3fc..23cba5e5d 100644 --- a/lib/Db/AccountsRequest.php +++ b/lib/Db/AccountsRequest.php @@ -21,7 +21,7 @@ public function getAccountData(string $userId): array { $this->limitToDBField($qb, 'uid', $userId); - $cursor = $qb->execute(); + $cursor = $qb->executeQuery(); $data = $cursor->fetch(); $cursor->closeCursor(); @@ -46,7 +46,7 @@ public function getFromUserId(string $userId): array { $this->limitToDBField($qb, 'uid', $userId); - $cursor = $qb->execute(); + $cursor = $qb->executeQuery(); $data = $cursor->fetch(); $cursor->closeCursor(); @@ -66,7 +66,7 @@ public function getAll(): array { $qb = $this->getAccountsSelectSql(); $accounts = []; - $cursor = $qb->execute(); + $cursor = $qb->executeQuery(); while ($data = $cursor->fetch()) { $account = $this->parseAccountsSelectSql($data); $accounts[$account['userId']] = $account; diff --git a/lib/Db/CircleRequest.php b/lib/Db/CircleRequest.php index 456dd1c45..25496b9d9 100644 --- a/lib/Db/CircleRequest.php +++ b/lib/Db/CircleRequest.php @@ -51,7 +51,7 @@ public function save(Circle $circle): void { ->setValue('settings', $qb->createNamedParameter(json_encode($circle->getSettings()))) ->setValue('config', $qb->createNamedParameter($circle->getConfig())); - $qb->execute(); + $qb->executeStatement(); } @@ -67,7 +67,7 @@ public function edit(Circle $circle): void { $qb->limitToUniqueId($circle->getSingleId()); - $qb->execute(); + $qb->executeStatement(); } /** @@ -83,7 +83,7 @@ public function update(Circle $circle) { $qb->limitToUniqueId($circle->getSingleId()); - $qb->execute(); + $qb->executeStatement(); } @@ -112,7 +112,7 @@ public function updateDisplayName(string $singleId, string $displayName): void { $qb->limitToUniqueId($singleId); - $qb->execute(); + $qb->executeStatement(); } @@ -125,7 +125,7 @@ public function updateConfig(Circle $circle) { $qb->limitToUniqueId($circle->getSingleId()); - $qb->execute(); + $qb->executeStatement(); } @@ -137,7 +137,7 @@ public function updateSettings(Circle $circle) { $qb->set('settings', $qb->createNamedParameter(json_encode($circle->getSettings()))); $qb->limitToUniqueId($circle->getSingleId()); - $qb->execute(); + $qb->executeStatement(); } @@ -513,7 +513,7 @@ public function delete(Circle $circle): void { $qb = $this->getCircleDeleteSql(); $qb->limitToUniqueId($circle->getSingleId()); - $qb->execute(); + $qb->executeStatement(); } @@ -524,6 +524,6 @@ public function deleteFederatedUser(IFederatedUser $federatedUser): void { $qb = $this->getCircleDeleteSql(); $qb->limitToUniqueId($federatedUser->getSingleId()); - $qb->execute(); + $qb->executeStatement(); } } diff --git a/lib/Db/CoreRequestBuilder.php b/lib/Db/CoreRequestBuilder.php index 662fb2cb9..2d49b1ef6 100644 --- a/lib/Db/CoreRequestBuilder.php +++ b/lib/Db/CoreRequestBuilder.php @@ -244,7 +244,7 @@ public function cleanDatabase(bool $shares = false): void { $qb = $this->getQueryBuilder(); try { $qb->delete($table); - $qb->execute(); + $qb->executeStatement(); } catch (Exception $e) { } } @@ -254,7 +254,7 @@ public function cleanDatabase(bool $shares = false): void { $expr = $qb->expr(); $qb->delete(self::TABLE_SHARE); $qb->where($expr->eq('share_type', $qb->createNamedParameter(IShare::TYPE_CIRCLE))); - $qb->execute(); + $qb->executeStatement(); } } @@ -292,7 +292,7 @@ public function uninstallFromMigrations() { $qb->limit('app', 'circles'); $qb->unlike('version', '001%'); - $qb->execute(); + $qb->executeStatement(); } /** @@ -302,6 +302,6 @@ public function uninstallFromJobs() { $qb = $this->getQueryBuilder(); // $qb->delete('jobs'); // $qb->where($this->exprLimitToDBField($qb, 'class', 'OCA\Circles\', true, true)); - // $qb->execute(); + // $qb->executeStatement(); } } diff --git a/lib/Db/EventWrapperRequest.php b/lib/Db/EventWrapperRequest.php index 967862438..7177180c8 100644 --- a/lib/Db/EventWrapperRequest.php +++ b/lib/Db/EventWrapperRequest.php @@ -11,7 +11,7 @@ namespace OCA\Circles\Db; -use Doctrine\DBAL\Exception\UniqueConstraintViolationException; +use OC\DB\Exceptions\DbalException; use OCA\Circles\Model\Federated\EventWrapper; use Psr\Log\LoggerInterface; @@ -41,8 +41,12 @@ public function save(EventWrapper $wrapper): void { ->setValue('creation', $qb->createNamedParameter($wrapper->getCreation())); try { - $qb->execute(); - } catch (UniqueConstraintViolationException $e) { + $qb->executeStatement(); + } catch (DbalException $e) { + if ($e->getReason() !== DbalException::REASON_UNIQUE_CONSTRAINT_VIOLATION) { + throw $e; + } + $logger = \OCP\Server::get(LoggerInterface::class); $logger->warning('issue while storing event', ['exception' => $e]); } @@ -60,7 +64,7 @@ public function update(EventWrapper $wrapper): void { $qb->limitToInstance($wrapper->getInstance()); $qb->limitToToken($wrapper->getToken()); - $qb->execute(); + $qb->executeStatement(); } @@ -74,7 +78,7 @@ public function updateAll(string $token, int $status): void { $qb->limitToToken($token); - $qb->execute(); + $qb->executeStatement(); } diff --git a/lib/Db/FileSharesRequest.php b/lib/Db/FileSharesRequest.php index c26e452ca..00f1f298b 100644 --- a/lib/Db/FileSharesRequest.php +++ b/lib/Db/FileSharesRequest.php @@ -32,7 +32,7 @@ public function removeSharesFromMember(DeprecatedMember $member): void { $expr->eq('uid_initiator', $qb->createNamedParameter($member->getUserId())), )); - $qb->execute(); + $qb->executeStatement(); } @@ -48,7 +48,7 @@ public function removeSharesToCircleId(string $circleId): void { $expr->eq('share_with', $qb->createNamedParameter($circleId)), )); - $qb->execute(); + $qb->executeStatement(); } @@ -64,7 +64,7 @@ public function getSharesForCircle(string $circleId): array { $this->limitToShareType($qb, self::SHARE_TYPE); $shares = []; - $cursor = $qb->execute(); + $cursor = $qb->executeQuery(); while ($data = $cursor->fetch()) { $shares[] = $data; } @@ -86,7 +86,7 @@ public function getShares(): array { $qb->andWhere($expr->isNull($this->default_select_alias . '.parent')); $shares = []; - $cursor = $qb->execute(); + $cursor = $qb->executeQuery(); while ($data = $cursor->fetch()) { $shares[] = $data; } diff --git a/lib/Db/GSSharesRequest.php b/lib/Db/GSSharesRequest.php index a7fc9bd3a..e4edb5cb3 100644 --- a/lib/Db/GSSharesRequest.php +++ b/lib/Db/GSSharesRequest.php @@ -38,7 +38,7 @@ public function create(GSShare $gsShare): void { ->setValue('parent', $qb->createNamedParameter($gsShare->getParent())) ->setValue('mountpoint', $qb->createNamedParameter($gsShare->getMountPoint())) ->setValue('mountpoint_hash', $qb->createNamedParameter($hash)); - $qb->execute(); + $qb->executeStatement(); } @@ -54,7 +54,7 @@ public function getForUser(string $userId): array { $this->leftJoinMountPoint($qb, $userId); $shares = []; - $cursor = $qb->execute(); + $cursor = $qb->executeQuery(); while ($data = $cursor->fetch()) { $shares[] = $this->parseGSSharesSelectSql($data); } @@ -73,7 +73,7 @@ public function removeGSSharesFromMember(DeprecatedMember $member) { $this->limitToInstance($qb, $member->getInstance()); $this->limitToOwner($qb, $member->getUserId()); - $qb->execute(); + $qb->executeStatement(); } @@ -126,7 +126,7 @@ public function getShareMountPointByPath(string $userId, string $target): GSShar $this->limitToMountpointHash($qb, $targetHash); $shares = []; - $cursor = $qb->execute(); + $cursor = $qb->executeQuery(); $data = $cursor->fetch(); if ($data === false) { @@ -151,7 +151,7 @@ public function getShareMountPointById(int $gsShareId, string $userId): GSShareM $this->limitToUserId($qb, $userId); $shares = []; - $cursor = $qb->execute(); + $cursor = $qb->executeQuery(); $data = $cursor->fetch(); if ($data === false) { throw new ShareNotFound(); @@ -173,7 +173,7 @@ public function generateShareMountPoint(GSShareMountpoint $mountpoint) { ->setValue('share_id', $qb->createNamedParameter($mountpoint->getShareId())) ->setValue('mountpoint', $qb->createNamedParameter($mountpoint->getMountPoint())) ->setValue('mountpoint_hash', $qb->createNamedParameter($hash)); - $qb->execute(); + $qb->executeStatement(); } @@ -192,7 +192,7 @@ public function updateShareMountPoint(GSShareMountpoint $mountpoint) { $this->limitToShareId($qb, $mountpoint->getShareId()); $this->limitToUserId($qb, $mountpoint->getUserId()); - $nb = $qb->execute(); + $nb = $qb->executeStatement(); return ($nb === 1); } diff --git a/lib/Db/MemberRequest.php b/lib/Db/MemberRequest.php index 71f6f8872..cdb716fac 100644 --- a/lib/Db/MemberRequest.php +++ b/lib/Db/MemberRequest.php @@ -53,7 +53,7 @@ public function save(Member $member): void { $qb->setValue('invited_by', $qb->createNamedParameter($member->getInvitedBy()->getSingleId())); } - $qb->execute(); + $qb->executeStatement(); } @@ -77,7 +77,7 @@ public function update(Member $member): void { $qb->limitToCircleId($member->getCircleId()); $qb->limitToSingleId($member->getSingleId()); - $qb->execute(); + $qb->executeStatement(); } @@ -112,7 +112,7 @@ public function updateDisplayName(string $singleId, string $displayName, string $qb->limitToCircleId($circleId); } - $qb->execute(); + $qb->executeStatement(); } @@ -124,7 +124,7 @@ public function delete(Member $member) { $qb->limitToCircleId($member->getCircleId()); $qb->limitToSingleId($member->getSingleId()); - $qb->execute(); + $qb->executeStatement(); } @@ -137,7 +137,7 @@ public function deleteFederatedUser(IFederatedUser $federatedUser): void { $qb->limitToMemberId($federatedUser->getSingleId()); $qb->limitToCircleId($federatedUser->getSingleId()); - $qb->execute(); + $qb->executeStatement(); } @@ -150,7 +150,7 @@ public function deleteFederatedUserFromCircle(IFederatedUser $federatedUser, Cir $qb->limitToSingleId($federatedUser->getSingleId()); $qb->limitToCircleId($circle->getSingleId()); - $qb->execute(); + $qb->executeStatement(); } @@ -167,7 +167,7 @@ public function deleteAllFromCircle(Circle $circle) { ) ); - $qb->execute(); + $qb->executeStatement(); } @@ -182,7 +182,7 @@ public function updateLevel(Member $member): void { $qb->limitToCircleId($member->getCircleId()); $qb->limitToSingleId($member->getSingleId()); - $qb->execute(); + $qb->executeStatement(); } diff --git a/lib/Db/MembershipRequest.php b/lib/Db/MembershipRequest.php index 7fabda4e8..bd4dcb527 100644 --- a/lib/Db/MembershipRequest.php +++ b/lib/Db/MembershipRequest.php @@ -38,7 +38,7 @@ public function insert(Membership $membership) { ); $qb->setValue('inheritance_depth', $qb->createNamedParameter($membership->getInheritanceDepth())); - $qb->execute(); + $qb->executeStatement(); } @@ -59,7 +59,7 @@ public function update(Membership $membership) { $qb->limitToSingleId($membership->getSingleId()); $qb->limitToCircleId($membership->getCircleId()); - $qb->execute(); + $qb->executeStatement(); } @@ -127,7 +127,7 @@ public function removeBySingleId(string $singleId, bool $all = false): void { $qb->limitToSingleId($singleId); } - $qb->execute(); + $qb->executeStatement(); } @@ -139,7 +139,7 @@ public function delete(Membership $membership): void { $qb->limitToSingleId($membership->getSingleId()); $qb->limitToCircleId($membership->getCircleId()); - $qb->execute(); + $qb->executeStatement(); } @@ -150,6 +150,6 @@ public function deleteFederatedUser(FederatedUser $federatedUser): void { $qb = $this->getMembershipDeleteSql(); $qb->limitToSingleId($federatedUser->getSingleId()); - $qb->execute(); + $qb->executeStatement(); } } diff --git a/lib/Db/MountRequest.php b/lib/Db/MountRequest.php index e77eabd1b..ec3765ab9 100644 --- a/lib/Db/MountRequest.php +++ b/lib/Db/MountRequest.php @@ -41,7 +41,7 @@ public function save(Mount $mount): void { ->setValue('remote', $qb->createNamedParameter($mount->getRemote())) ->setValue('remote_id', $qb->createNamedParameter($mount->getRemoteShareId(), IQueryBuilder::PARAM_INT)); - $qb->execute(); + $qb->executeStatement(); } @@ -52,7 +52,7 @@ public function delete(string $token): void { $qb = $this->getMountDeleteSql(); $qb->limitToToken($token); - $qb->execute(); + $qb->executeStatement(); } @@ -101,7 +101,7 @@ public function getForUser(IFederatedUser $federatedUser): array { // $this->leftJoinMountPoint($qb, $userId); // $shares = []; - // $cursor = $qb->execute(); + // $cursor = $qb->executeQuery(); // while ($data = $cursor->fetch()) { // $shares[] = $this->parseGSSharesSelectSql($data); // } @@ -122,7 +122,7 @@ public function getForUser(IFederatedUser $federatedUser): array { // $this->leftJoinMountPoint($qb, $userId); // // $shares = []; - // $cursor = $qb->execute(); + // $cursor = $qb->executeQuery(); // while ($data = $cursor->fetch()) { // $shares[] = $this->parseGSSharesSelectSql($data); // } @@ -141,7 +141,7 @@ public function getForUser(IFederatedUser $federatedUser): array { // $this->limitToInstance($qb, $member->getInstance()); // $this->limitToOwner($qb, $member->getUserId()); // - // $qb->execute(); + // $qb->executeStatement(); // } // // @@ -194,7 +194,7 @@ public function getForUser(IFederatedUser $federatedUser): array { // $this->limitToMountpointHash($qb, $targetHash); // // $shares = []; - // $cursor = $qb->execute(); + // $cursor = $qb->executeQuery(); // $data = $cursor->fetch(); // // if ($data === false) { @@ -219,7 +219,7 @@ public function getForUser(IFederatedUser $federatedUser): array { // $this->limitToUserId($qb, $userId); // // $shares = []; - // $cursor = $qb->execute(); + // $cursor = $qb->executeQuery(); // $data = $cursor->fetch(); // if ($data === false) { // throw new ShareNotFound(); @@ -241,7 +241,7 @@ public function getForUser(IFederatedUser $federatedUser): array { // ->setValue('share_id', $qb->createNamedParameter($mountpoint->getShareId())) // ->setValue('mountpoint', $qb->createNamedParameter($mountpoint->getMountPoint())) // ->setValue('mountpoint_hash', $qb->createNamedParameter($hash)); - // $qb->execute(); + // $qb->executeStatement(); // } // // @@ -260,7 +260,7 @@ public function getForUser(IFederatedUser $federatedUser): array { // // $this->limitToShareId($qb, $mountpoint->getShareId()); // $this->limitToUserId($qb, $mountpoint->getUserId()); - // $nb = $qb->execute(); + // $nb = $qb->executeStatement(); // // return ($nb === 1); // } diff --git a/lib/Db/RemoteRequest.php b/lib/Db/RemoteRequest.php index 872d3ba78..dbc09865b 100644 --- a/lib/Db/RemoteRequest.php +++ b/lib/Db/RemoteRequest.php @@ -40,7 +40,7 @@ public function save(RemoteInstance $remote): void { ->setValue('interface', $qb->createNamedParameter($remote->getInterface())) ->setValue('item', $qb->createNamedParameter(json_encode($remote->getOrigData()))); - $qb->execute(); + $qb->executeStatement(); } @@ -59,7 +59,7 @@ public function update(RemoteInstance $remote) { $qb->limitToInstance($remote->getInstance()); - $qb->execute(); + $qb->executeStatement(); } @@ -75,7 +75,7 @@ public function updateItem(RemoteInstance $remote) { $qb->limit('uid', $remote->getUid(true), '', false); - $qb->execute(); + $qb->executeStatement(); } @@ -91,7 +91,7 @@ public function updateInstance(RemoteInstance $remote) { $qb->limit('uid', $remote->getUid(true), '', false); - $qb->execute(); + $qb->executeStatement(); } @@ -107,7 +107,7 @@ public function updateType(RemoteInstance $remote) { $qb->limit('uid', $remote->getUid(true), '', false); - $qb->execute(); + $qb->executeStatement(); } @@ -123,7 +123,7 @@ public function updateHref(RemoteInstance $remote) { $qb->limit('uid', $remote->getUid(true), '', false); - $qb->execute(); + $qb->executeStatement(); } @@ -259,6 +259,6 @@ public function searchDuplicate(RemoteInstance $remoteInstance): RemoteInstance public function deleteById(RemoteInstance $remoteInstance) { $qb = $this->getRemoteDeleteSql(); $qb->limitToId($remoteInstance->getDbId()); - $qb->execute(); + $qb->executeStatement(); } } diff --git a/lib/Db/ShareLockRequest.php b/lib/Db/ShareLockRequest.php index 89db4da25..5a23150b1 100644 --- a/lib/Db/ShareLockRequest.php +++ b/lib/Db/ShareLockRequest.php @@ -34,7 +34,7 @@ public function save(FederatedShare $share): void { ->setValue('circle_id', $qb->createNamedParameter($share->getCircleId())) ->setValue('instance', $qb->createNamedParameter($qb->getInstance($share))); - $qb->execute(); + $qb->executeStatement(); } diff --git a/lib/Db/ShareTokenRequest.php b/lib/Db/ShareTokenRequest.php index 86a560d9a..628b52bc2 100644 --- a/lib/Db/ShareTokenRequest.php +++ b/lib/Db/ShareTokenRequest.php @@ -36,7 +36,7 @@ public function save(ShareToken $token): void { ->setValue('password', $qb->createNamedParameter($token->getPassword())) ->setValue('accepted', $qb->createNamedParameter($token->getAccepted())); - $qb->execute(); + $qb->executeStatement(); $id = $qb->getLastInsertId(); $token->setDbId($id); } @@ -95,7 +95,7 @@ public function removeTokens(string $singleId, string $circleId) { $qb->limitToSingleId($singleId); $qb->limitToCircleId($circleId); - $qb->execute(); + $qb->executeStatement(); } /** diff --git a/lib/Db/ShareWrapperRequest.php b/lib/Db/ShareWrapperRequest.php index 9c6e375d6..bf84291ea 100644 --- a/lib/Db/ShareWrapperRequest.php +++ b/lib/Db/ShareWrapperRequest.php @@ -62,7 +62,7 @@ public function save(IShare $share, int $parentId = 0): int { $qb->setValue('parent', $qb->createNamedParameter($parentId)); } - $qb->execute(); + $qb->executeStatement(); $id = $qb->getLastInsertId(); try { $share->setId((string)$id); @@ -92,7 +92,7 @@ public function update(ShareWrapper $shareWrapper): void { $qb->limitToId((int)$shareWrapper->getId()); - $qb->execute(); + $qb->executeStatement(); } /** @@ -108,7 +108,7 @@ public function updateChildPermissions(ShareWrapper $shareWrapper): void { $qb->limitToShareParent((int)$shareWrapper->getId()); $qb->gt('permissions', 0); - $qb->execute(); + $qb->executeStatement(); } @@ -120,7 +120,7 @@ public function deleteByMembership(Membership $membership) { $qb->limitToShareWith($membership->getCircleId()); $qb->limit('uid_initiator', $membership->getSingleId()); - $qb->execute(); + $qb->executeStatement(); } @@ -475,7 +475,7 @@ public function delete(int $shareId): void { ) ); - $qb->execute(); + $qb->executeStatement(); } /** @@ -512,7 +512,7 @@ public function removeOrphanShares(): void { $qb->limitNull('id', false, 'p'); $ids = []; - $cursor = $qb->execute(); + $cursor = $qb->executeQuery(); while ($data = $cursor->fetch()) { $ids[] = $data['id']; } @@ -534,7 +534,7 @@ private function deleteSharesAndChild(array $ids): void { ) ); - $qb->execute(); + $qb->executeStatement(); } diff --git a/lib/Db/TokensRequest.php b/lib/Db/TokensRequest.php index cc3c6ed5e..96254e887 100644 --- a/lib/Db/TokensRequest.php +++ b/lib/Db/TokensRequest.php @@ -8,7 +8,7 @@ namespace OCA\Circles\Db; -use Doctrine\DBAL\Exception\UniqueConstraintViolationException; +use OC\DB\Exceptions\DbalException; use OCA\Circles\Exceptions\TokenDoesNotExistException; use OCA\Circles\Model\DeprecatedMember; use OCA\Circles\Model\SharesToken; @@ -32,7 +32,7 @@ public function getByToken(string $token) { $qb = $this->getTokensSelectSql(); $this->limitToToken($qb, $token); - $cursor = $qb->execute(); + $cursor = $qb->executeQuery(); $data = $cursor->fetch(); $cursor->closeCursor(); if ($data === false) { @@ -57,7 +57,7 @@ public function getTokenFromMember(string $shareId, string $circleId, string $em $this->limitToUserId($qb, $email); $this->limitToCircleId($qb, $circleId); - $cursor = $qb->execute(); + $cursor = $qb->executeQuery(); $data = $cursor->fetch(); $cursor->closeCursor(); if ($data === false) { @@ -79,7 +79,7 @@ public function getTokensFromMember(DeprecatedMember $member) { $this->limitToCircleId($qb, $member->getCircleId()); $shares = []; - $cursor = $qb->execute(); + $cursor = $qb->executeQuery(); while ($data = $cursor->fetch()) { $shares[] = $this->parseTokensSelectSql($data); } @@ -115,7 +115,11 @@ public function generateTokenForMember(DeprecatedMember $member, int $shareId, s ->setValue('password', $qb->createNamedParameter($password)); $qb->execute(); - } catch (UniqueConstraintViolationException $e) { + $qb->executeStatement(); + } catch (DbalException $e) { + if ($e->getReason() !== DbalException::REASON_UNIQUE_CONSTRAINT_VIOLATION) { + throw $e; + } } return $this->getTokenFromMember($shareId, $member->getCircleId(), $member->getUserId()); @@ -129,7 +133,7 @@ public function removeTokenByShareId(int $shareId) { $qb = $this->getTokensDeleteSql(); $this->limitToShareId($qb, $shareId); - $qb->execute(); + $qb->executeStatement(); } @@ -141,7 +145,7 @@ public function removeTokensFromMember(DeprecatedMember $member) { $this->limitToCircleId($qb, $member->getCircleId()); $this->limitToUserId($qb, $member->getUserId()); - $qb->execute(); + $qb->executeStatement(); } @@ -156,6 +160,6 @@ public function updateSinglePassword(string $circleId, string $password) { $this->limitToCircleId($qb, $circleId); $qb->set('password', $qb->createNamedParameter($password)); - $qb->execute(); + $qb->executeStatement(); } } diff --git a/lib/ShareByCircleProvider.php b/lib/ShareByCircleProvider.php index 719f04381..847711cff 100644 --- a/lib/ShareByCircleProvider.php +++ b/lib/ShareByCircleProvider.php @@ -791,7 +791,7 @@ public function getAllShares(): iterable { // ) // ); // - // $cursor = $qb->execute(); + // $cursor = $qb->executeQuery(); // while ($data = $cursor->fetch()) { // try { // yield $this->createShareObject($data); diff --git a/lib/Tools/Db/ExtendedQueryBuilder.php b/lib/Tools/Db/ExtendedQueryBuilder.php index 0ce682c6e..1157708b8 100644 --- a/lib/Tools/Db/ExtendedQueryBuilder.php +++ b/lib/Tools/Db/ExtendedQueryBuilder.php @@ -995,7 +995,7 @@ private function parseSimpleSelectSql( * @throws RowNotFoundException */ public function getRow(callable $method, string $object = '', array $params = []): IQueryRow { - $cursor = $this->execute(); + $cursor = $this->executeQuery(); $data = $cursor->fetch(); $cursor->closeCursor(); @@ -1016,7 +1016,7 @@ public function getRow(callable $method, string $object = '', array $params = [] */ public function getRows(callable $method, string $object = '', array $params = []): array { $rows = []; - $cursor = $this->execute(); + $cursor = $this->executeQuery(); while ($data = $cursor->fetch()) { try { $rows[] = $method($data, $this, $object, $params);