summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Molenaar <SMillerDev@users.noreply.github.com>2021-11-15 19:57:50 +0100
committerBenjamin Brahmer <info@b-brahmer.de>2021-11-18 14:10:57 +0100
commita52eee5671c81df6b1b1afffc12bd183354affe8 (patch)
tree368150bdf599ed81c4711b3cc9ab7f73e8b575b2
parent7d05abc7691c52db803acc1837d2b4f2c7941017 (diff)
chore: use executeStatement instead of executeUpdate
Signed-off-by: Sean Molenaar sean@seanmolenaar.eu Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
-rw-r--r--lib/Db/FeedMapperV2.php2
-rw-r--r--lib/Db/FolderMapperV2.php2
-rw-r--r--lib/Db/ItemMapperV2.php4
-rw-r--r--tests/Unit/Db/FeedMapperTest.php4
-rw-r--r--tests/Unit/Db/FolderMapperTest.php4
-rw-r--r--tests/Unit/Db/ItemMapperTest.php8
6 files changed, 12 insertions, 12 deletions
diff --git a/lib/Db/FeedMapperV2.php b/lib/Db/FeedMapperV2.php
index eaa9030cc..15e606c1f 100644
--- a/lib/Db/FeedMapperV2.php
+++ b/lib/Db/FeedMapperV2.php
@@ -193,6 +193,6 @@ class FeedMapperV2 extends NewsMapperV2
->setParameter('unread', false, IQueryBuilder::PARAM_BOOL)
->setParameter('idList', $idList, IQueryBuilder::PARAM_INT_ARRAY);
- return $this->db->executeUpdate($builder->getSQL(), $builder->getParameters(), $builder->getParameterTypes());
+ return $this->db->executeStatement($builder->getSQL(), $builder->getParameters(), $builder->getParameterTypes());
}
}
diff --git a/lib/Db/FolderMapperV2.php b/lib/Db/FolderMapperV2.php
index d0d0cbec1..d3f1c2429 100644
--- a/lib/Db/FolderMapperV2.php
+++ b/lib/Db/FolderMapperV2.php
@@ -136,6 +136,6 @@ class FolderMapperV2 extends NewsMapperV2
->setParameter('unread', false, IQueryBuilder::PARAM_BOOL)
->setParameter('idList', $idList, IQueryBuilder::PARAM_INT_ARRAY);
- return $this->db->executeUpdate($builder->getSQL(), $builder->getParameters(), $builder->getParameterTypes());
+ return $this->db->executeStatement($builder->getSQL(), $builder->getParameters(), $builder->getParameterTypes());
}
}
diff --git a/lib/Db/ItemMapperV2.php b/lib/Db/ItemMapperV2.php
index d215b4e26..676a8bd82 100644
--- a/lib/Db/ItemMapperV2.php
+++ b/lib/Db/ItemMapperV2.php
@@ -228,7 +228,7 @@ class ItemMapperV2 extends NewsMapperV2
$affected_rows = 0;
// split $total_items into multiple chunks because of the parameter limit
foreach (array_chunk($total_items, NewsMapperV2::PDO_PARAMS_LIMIT) as $items_chunk) {
- $affected_rows += $this->db->executeUpdate(
+ $affected_rows += $this->db->executeStatement(
$deleteQb->getSQL(),
[$items_chunk],
[IQueryBuilder::PARAM_INT_ARRAY]
@@ -282,7 +282,7 @@ class ItemMapperV2 extends NewsMapperV2
->setParameter('unread', false, IQueryBuilder::PARAM_BOOL)
->setParameter('idList', $idList, IQueryBuilder::PARAM_INT_ARRAY);
- return $this->db->executeUpdate($builder->getSQL(), $builder->getParameters(), $builder->getParameterTypes());
+ return $this->db->executeStatement($builder->getSQL(), $builder->getParameters(), $builder->getParameterTypes());
}
/**
diff --git a/tests/Unit/Db/FeedMapperTest.php b/tests/Unit/Db/FeedMapperTest.php
index c42ffee67..499989062 100644
--- a/tests/Unit/Db/FeedMapperTest.php
+++ b/tests/Unit/Db/FeedMapperTest.php
@@ -551,7 +551,7 @@ class FeedMapperTest extends MapperTestUtility
->will($this->returnValue([]));
$this->db->expects($this->exactly(1))
- ->method('executeUpdate')
+ ->method('executeStatement')
->with('QUERY');
$this->class->read('admin', 1);
@@ -653,7 +653,7 @@ class FeedMapperTest extends MapperTestUtility
->will($this->returnValue([]));
$this->db->expects($this->exactly(1))
- ->method('executeUpdate')
+ ->method('executeStatement')
->with('QUERY');
$this->class->read('admin', 1, 4);
diff --git a/tests/Unit/Db/FolderMapperTest.php b/tests/Unit/Db/FolderMapperTest.php
index 3e15e8004..a7f9f0c9d 100644
--- a/tests/Unit/Db/FolderMapperTest.php
+++ b/tests/Unit/Db/FolderMapperTest.php
@@ -379,7 +379,7 @@ class FolderMapperTest extends MapperTestUtility
->will($this->returnValue([]));
$this->db->expects($this->exactly(1))
- ->method('executeUpdate')
+ ->method('executeStatement')
->with('QUERY');
$this->class->read('admin', 1);
@@ -482,7 +482,7 @@ class FolderMapperTest extends MapperTestUtility
->will($this->returnValue([]));
$this->db->expects($this->exactly(1))
- ->method('executeUpdate')
+ ->method('executeStatement')
->with('QUERY');
$this->class->read('admin', 1, 4);
diff --git a/tests/Unit/Db/ItemMapperTest.php b/tests/Unit/Db/ItemMapperTest.php
index 2d831e784..7fc45018e 100644
--- a/tests/Unit/Db/ItemMapperTest.php
+++ b/tests/Unit/Db/ItemMapperTest.php
@@ -565,7 +565,7 @@ class ItemMapperTest extends MapperTestUtility
->will($this->returnValue([]));
$this->db->expects($this->exactly(1))
- ->method('executeUpdate')
+ ->method('executeStatement')
->with('QUERY');
$this->class->readAll('admin', 4);
@@ -791,7 +791,7 @@ class ItemMapperTest extends MapperTestUtility
->willReturn('DELETE_SQL');
$this->db->expects($this->once())
- ->method('executeUpdate')
+ ->method('executeStatement')
->with('DELETE_SQL', [[4, 6, 8, 3, 5, 7]], [101])
->will($this->returnValue(10));
@@ -949,7 +949,7 @@ class ItemMapperTest extends MapperTestUtility
->willReturn('DELETE_SQL');
$this->db->expects($this->once())
- ->method('executeUpdate')
+ ->method('executeStatement')
->with('DELETE_SQL', [[4, 6, 8, 3, 5, 7]], [101])
->will($this->returnValue(10));
@@ -1106,7 +1106,7 @@ class ItemMapperTest extends MapperTestUtility
->willReturn('DELETE_SQL');
$this->db->expects($this->once())
- ->method('executeUpdate')
+ ->method('executeStatement')
->with('DELETE_SQL', [[4, 6, 8]], [101])
->will($this->returnValue(10));