diff options
Diffstat (limited to 'lib/Db/StepMapper.php')
-rw-r--r-- | lib/Db/StepMapper.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Db/StepMapper.php b/lib/Db/StepMapper.php index 472f28183..ed510ce59 100644 --- a/lib/Db/StepMapper.php +++ b/lib/Db/StepMapper.php @@ -55,7 +55,7 @@ class StepMapper extends QBMapper { $qb = $this->db->getQueryBuilder(); $qb->delete($this->getTableName()) ->where($qb->expr()->eq('document_id', $qb->createNamedParameter($documentId))) - ->execute(); + ->executeStatement(); } public function deleteBeforeVersion($documentId, $version): void { @@ -63,15 +63,14 @@ class StepMapper extends QBMapper { $qb->delete($this->getTableName()) ->where($qb->expr()->eq('document_id', $qb->createNamedParameter($documentId))) ->andWhere($qb->expr()->lte('version', $qb->createNamedParameter($version))) - ->execute(); + ->executeStatement(); } public function deleteAfterVersion($documentId, $version): int { $qb = $this->db->getQueryBuilder(); - $result = $qb->delete($this->getTableName()) + return $qb->delete($this->getTableName()) ->where($qb->expr()->eq('document_id', $qb->createNamedParameter($documentId))) ->andWhere($qb->expr()->gt('version', $qb->createNamedParameter($version))) - ->execute(); - return $result->rowCount(); + ->executeStatement(); } } |