From e1ddf7f0127e9745f94e5ff9f76ea828e9058720 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Mon, 15 Sep 2014 22:35:56 +0200 Subject: Run unit tests across different database backends + fix bugs --- vendor/PicoDb/Database.php | 6 ++++++ vendor/PicoDb/Table.php | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'vendor/PicoDb') diff --git a/vendor/PicoDb/Database.php b/vendor/PicoDb/Database.php index 4d7b7031..5d0beb8a 100644 --- a/vendor/PicoDb/Database.php +++ b/vendor/PicoDb/Database.php @@ -78,6 +78,12 @@ class Database } + public function closeConnection() + { + $this->pdo = null; + } + + public function escapeIdentifier($value) { return $this->pdo->escapeIdentifier($value); diff --git a/vendor/PicoDb/Table.php b/vendor/PicoDb/Table.php index b333feb4..cc637434 100644 --- a/vendor/PicoDb/Table.php +++ b/vendor/PicoDb/Table.php @@ -44,7 +44,11 @@ class Table } } - + /** + * Update + * + * Note: Do not use `rowCount()` the behaviour is different across drivers + */ public function update(array $data) { $columns = array(); @@ -70,7 +74,7 @@ class Table $result = $this->db->execute($sql, $values); - return $result !== false && $result->rowCount() > 0; + return $result !== false; } -- cgit v1.2.3