From 0818225cc39d61498b65898590f4d26fcb79ec03 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Tue, 28 Jun 2016 00:14:29 +0200 Subject: [PATCH] removed unused ISupplementalDriver::normalizeRow() (BC break) --- src/Database/Drivers/MsSqlDriver.php | 9 --------- src/Database/Drivers/MySqlDriver.php | 9 --------- src/Database/Drivers/OciDriver.php | 9 --------- src/Database/Drivers/OdbcDriver.php | 9 --------- src/Database/Drivers/PgSqlDriver.php | 9 --------- src/Database/Drivers/SqliteDriver.php | 9 --------- src/Database/Drivers/SqlsrvDriver.php | 9 --------- src/Database/ISupplementalDriver.php | 5 ----- src/Database/ResultSet.php | 10 +++------- 9 files changed, 3 insertions(+), 75 deletions(-) diff --git a/src/Database/Drivers/MsSqlDriver.php b/src/Database/Drivers/MsSqlDriver.php index 4a4d8f8b9..504c4f9e7 100644 --- a/src/Database/Drivers/MsSqlDriver.php +++ b/src/Database/Drivers/MsSqlDriver.php @@ -91,15 +91,6 @@ public function applyLimit(string &$sql, ?int $limit, ?int $offset): void } - /** - * Normalizes result row. - */ - public function normalizeRow(array $row): array - { - return $row; - } - - /********************* reflection ****************d*g**/ diff --git a/src/Database/Drivers/MySqlDriver.php b/src/Database/Drivers/MySqlDriver.php index 59b952e6f..b1db866e1 100644 --- a/src/Database/Drivers/MySqlDriver.php +++ b/src/Database/Drivers/MySqlDriver.php @@ -125,15 +125,6 @@ public function applyLimit(string &$sql, ?int $limit, ?int $offset): void } - /** - * Normalizes result row. - */ - public function normalizeRow(array $row): array - { - return $row; - } - - /********************* reflection ****************d*g**/ diff --git a/src/Database/Drivers/OciDriver.php b/src/Database/Drivers/OciDriver.php index 45c92120f..d42533b07 100644 --- a/src/Database/Drivers/OciDriver.php +++ b/src/Database/Drivers/OciDriver.php @@ -111,15 +111,6 @@ public function applyLimit(string &$sql, ?int $limit, ?int $offset): void } - /** - * Normalizes result row. - */ - public function normalizeRow(array $row): array - { - return $row; - } - - /********************* reflection ****************d*g**/ diff --git a/src/Database/Drivers/OdbcDriver.php b/src/Database/Drivers/OdbcDriver.php index 08a392205..3e600cfd8 100644 --- a/src/Database/Drivers/OdbcDriver.php +++ b/src/Database/Drivers/OdbcDriver.php @@ -90,15 +90,6 @@ public function applyLimit(string &$sql, ?int $limit, ?int $offset): void } - /** - * Normalizes result row. - */ - public function normalizeRow(array $row): array - { - return $row; - } - - /********************* reflection ****************d*g**/ diff --git a/src/Database/Drivers/PgSqlDriver.php b/src/Database/Drivers/PgSqlDriver.php index 2bc6ebfed..e39de1256 100644 --- a/src/Database/Drivers/PgSqlDriver.php +++ b/src/Database/Drivers/PgSqlDriver.php @@ -113,15 +113,6 @@ public function applyLimit(string &$sql, ?int $limit, ?int $offset): void } - /** - * Normalizes result row. - */ - public function normalizeRow(array $row): array - { - return $row; - } - - /********************* reflection ****************d*g**/ diff --git a/src/Database/Drivers/SqliteDriver.php b/src/Database/Drivers/SqliteDriver.php index e28c86c72..022b25851 100644 --- a/src/Database/Drivers/SqliteDriver.php +++ b/src/Database/Drivers/SqliteDriver.php @@ -117,15 +117,6 @@ public function applyLimit(string &$sql, ?int $limit, ?int $offset): void } - /** - * Normalizes result row. - */ - public function normalizeRow(array $row): array - { - return $row; - } - - /********************* reflection ****************d*g**/ diff --git a/src/Database/Drivers/SqlsrvDriver.php b/src/Database/Drivers/SqlsrvDriver.php index c83ba1338..16d7a602f 100644 --- a/src/Database/Drivers/SqlsrvDriver.php +++ b/src/Database/Drivers/SqlsrvDriver.php @@ -109,15 +109,6 @@ public function applyLimit(string &$sql, ?int $limit, ?int $offset): void } - /** - * Normalizes result row. - */ - public function normalizeRow(array $row): array - { - return $row; - } - - /********************* reflection ****************d*g**/ diff --git a/src/Database/ISupplementalDriver.php b/src/Database/ISupplementalDriver.php index 64967ce74..76d6c2ec9 100644 --- a/src/Database/ISupplementalDriver.php +++ b/src/Database/ISupplementalDriver.php @@ -55,11 +55,6 @@ function formatLike(string $value, int $pos): string; */ function applyLimit(string &$sql, ?int $limit, ?int $offset): void; - /** - * Normalizes result row. - */ - function normalizeRow(array $row): array; - /********************* reflection ****************d*g**/ diff --git a/src/Database/ResultSet.php b/src/Database/ResultSet.php index e52b75844..fc775b1fb 100644 --- a/src/Database/ResultSet.php +++ b/src/Database/ResultSet.php @@ -23,9 +23,6 @@ class ResultSet implements \Iterator, IRowContainer /** @var Connection */ private $connection; - /** @var ISupplementalDriver */ - private $supplementalDriver; - /** @var \PDOStatement|NULL */ private $pdoStatement; @@ -55,7 +52,6 @@ public function __construct(Connection $connection, $queryString, array $params) { $time = microtime(TRUE); $this->connection = $connection; - $this->supplementalDriver = $connection->getSupplementalDriver(); $this->queryString = $queryString; $this->params = $params; @@ -74,7 +70,7 @@ public function __construct(Connection $connection, $queryString, array $params) $this->pdoStatement->execute(); } } catch (\PDOException $e) { - $e = $this->supplementalDriver->convertException($e); + $e = $connection->getSupplementalDriver()->convertException($e); $e->queryString = $queryString; throw $e; } @@ -133,7 +129,7 @@ public function getTime(): float public function normalizeRow(array $row): array { if ($this->types === NULL) { - $this->types = (array) $this->supplementalDriver->getColumnTypes($this->pdoStatement); + $this->types = (array) $this->connection->getSupplementalDriver()->getColumnTypes($this->pdoStatement); } foreach ($this->types as $key => $type) { @@ -166,7 +162,7 @@ public function normalizeRow(array $row): array } } - return $this->supplementalDriver->normalizeRow($row); + return $row; }