Skip to content

Commit

Permalink
removed unused ISupplementalDriver::normalizeRow() (BC break)
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Feb 2, 2017
1 parent e662ef6 commit 0818225
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 75 deletions.
9 changes: 0 additions & 9 deletions src/Database/Drivers/MsSqlDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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**/


Expand Down
9 changes: 0 additions & 9 deletions src/Database/Drivers/MySqlDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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**/


Expand Down
9 changes: 0 additions & 9 deletions src/Database/Drivers/OciDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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**/


Expand Down
9 changes: 0 additions & 9 deletions src/Database/Drivers/OdbcDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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**/


Expand Down
9 changes: 0 additions & 9 deletions src/Database/Drivers/PgSqlDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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**/


Expand Down
9 changes: 0 additions & 9 deletions src/Database/Drivers/SqliteDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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**/


Expand Down
9 changes: 0 additions & 9 deletions src/Database/Drivers/SqlsrvDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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**/


Expand Down
5 changes: 0 additions & 5 deletions src/Database/ISupplementalDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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**/

Expand Down
10 changes: 3 additions & 7 deletions src/Database/ResultSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ class ResultSet implements \Iterator, IRowContainer
/** @var Connection */
private $connection;

/** @var ISupplementalDriver */
private $supplementalDriver;

/** @var \PDOStatement|NULL */
private $pdoStatement;

Expand Down Expand Up @@ -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;

Expand All @@ -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;
}
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -166,7 +162,7 @@ public function normalizeRow(array $row): array
}
}

return $this->supplementalDriver->normalizeRow($row);
return $row;
}


Expand Down

0 comments on commit 0818225

Please sign in to comment.