diff options
author | Joas Schilling <coding@schilljs.com> | 2021-05-11 09:40:41 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-05-11 09:40:41 +0300 |
commit | 5531cab0f32b09a93743312331e5ab3db4c51ecd (patch) | |
tree | 6452301baa5a0076675fa3434abdda895aa51baf /lib | |
parent | 7d26890d9420ecad56d2a5668e7949b30802f768 (diff) |
Replace executeUpdate with executeStatement
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Controller/PushController.php | 8 | ||||
-rw-r--r-- | lib/Handler.php | 4 | ||||
-rw-r--r-- | lib/Push.php | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/lib/Controller/PushController.php b/lib/Controller/PushController.php index 475daa7..9a24bc7 100644 --- a/lib/Controller/PushController.php +++ b/lib/Controller/PushController.php @@ -223,7 +223,7 @@ class PushController extends OCSController { 'proxyserver' => $query->createNamedParameter($proxyServer), 'apptype' => $query->createNamedParameter($appType), ]); - return $query->executeUpdate() > 0; + return $query->executeStatement() > 0; } /** @@ -248,7 +248,7 @@ class PushController extends OCSController { ->where($query->expr()->eq('uid', $query->createNamedParameter($user->getUID()))) ->andWhere($query->expr()->eq('token', $query->createNamedParameter($token->getId(), IQueryBuilder::PARAM_INT))); - return $query->executeUpdate() !== 0; + return $query->executeStatement() !== 0; } /** @@ -262,7 +262,7 @@ class PushController extends OCSController { ->where($query->expr()->eq('uid', $query->createNamedParameter($user->getUID()))) ->andWhere($query->expr()->eq('token', $query->createNamedParameter($token->getId(), IQueryBuilder::PARAM_INT))); - return $query->executeUpdate() !== 0; + return $query->executeStatement() !== 0; } /** @@ -276,6 +276,6 @@ class PushController extends OCSController { ->where($query->expr()->eq('uid', $query->createNamedParameter($user->getUID()))) ->andWhere($query->expr()->eq('pushtokenhash', $query->createNamedParameter($pushTokenHash))); - return $query->executeUpdate() !== 0; + return $query->executeStatement() !== 0; } } diff --git a/lib/Handler.php b/lib/Handler.php index ecca4ab..e3a8cb1 100644 --- a/lib/Handler.php +++ b/lib/Handler.php @@ -54,7 +54,7 @@ class Handler { $sql = $this->connection->getQueryBuilder(); $sql->insert('notifications'); $this->sqlInsert($sql, $notification); - $sql->executeUpdate(); + $sql->executeStatement(); return $sql->getLastInsertId(); } @@ -153,7 +153,7 @@ class Handler { $sql->delete('notifications') ->where($sql->expr()->eq('notification_id', $sql->createNamedParameter($id))) ->andWhere($sql->expr()->eq('user', $sql->createNamedParameter($user))); - return (bool) $sql->executeUpdate(); + return (bool) $sql->executeStatement(); } /** diff --git a/lib/Push.php b/lib/Push.php index 1f7654f..571059c 100644 --- a/lib/Push.php +++ b/lib/Push.php @@ -534,7 +534,7 @@ class Push { $query->delete('notifications_pushhash') ->where($query->expr()->eq('token', $query->createNamedParameter($tokenId, IQueryBuilder::PARAM_INT))); - return $query->executeUpdate() !== 0; + return $query->executeStatement() !== 0; } /** @@ -546,6 +546,6 @@ class Push { $query->delete('notifications_pushhash') ->where($query->expr()->eq('deviceidentifier', $query->createNamedParameter($deviceIdentifier))); - return $query->executeUpdate() !== 0; + return $query->executeStatement() !== 0; } } |