Skip to content

Commit

Permalink
removed dead & unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Aug 24, 2014
1 parent 2a3881d commit 5b7bf41
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 41 deletions.
3 changes: 1 addition & 2 deletions src/Bridges/DatabaseDI/DatabaseExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@

namespace Nette\Bridges\DatabaseDI;

use Nette,
Nette\DI\ContainerBuilder;
use Nette;


/**
Expand Down
8 changes: 0 additions & 8 deletions src/Database/Drivers/MsSqlDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@
*/
class MsSqlDriver extends Nette\Object implements Nette\Database\ISupplementalDriver
{
/** @var Nette\Database\Connection */
private $connection;


public function __construct(Nette\Database\Connection $connection, array $options)
{
$this->connection = $connection;
}


/********************* SQL ****************d*g**/
Expand Down
16 changes: 0 additions & 16 deletions src/Database/Drivers/MySqlDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,6 @@ public function normalizeRow($row)
*/
public function getTables()
{
/*$this->connection->query("
SELECT TABLE_NAME as name, TABLE_TYPE = 'VIEW' as view
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = DATABASE()
");*/
$tables = array();
foreach ($this->connection->query('SHOW FULL TABLES') as $row) {
$tables[] = array(
Expand All @@ -135,11 +130,6 @@ public function getTables()
*/
public function getColumns($table)
{
/*$this->connection->query("
SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = {$this->connection->quote($table)} AND TABLE_SCHEMA = DATABASE()
");*/
$columns = array();
foreach ($this->connection->query('SHOW FULL COLUMNS FROM ' . $this->delimite($table)) as $row) {
$type = explode('(', $row['Type']);
Expand All @@ -165,12 +155,6 @@ public function getColumns($table)
*/
public function getIndexes($table)
{
/*$this->connection->query("
SELECT *
FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE
WHERE TABLE_NAME = {$this->connection->quote($table)} AND TABLE_SCHEMA = DATABASE()
AND REFERENCED_COLUMN_NAME IS NULL
");*/
$indexes = array();
foreach ($this->connection->query('SHOW INDEX FROM ' . $this->delimite($table)) as $row) {
$indexes[$row['Key_name']]['name'] = $row['Key_name'];
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 @@ -17,15 +17,6 @@
*/
class OdbcDriver extends Nette\Object implements Nette\Database\ISupplementalDriver
{
/** @var Nette\Database\Connection */
private $connection;


public function __construct(Nette\Database\Connection $connection, array $options)
{
$this->connection = $connection;
}


/********************* SQL ****************d*g**/

Expand Down
1 change: 0 additions & 1 deletion src/Database/Drivers/SqliteDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public function __construct(Nette\Database\Connection $connection, array $option
{
$this->connection = $connection;
$this->fmtDateTime = isset($options['formatDateTime']) ? $options['formatDateTime'] : 'U';
//$connection->query('PRAGMA foreign_keys = ON');
}


Expand Down
1 change: 0 additions & 1 deletion src/Database/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public static function dumpResult(ResultSet $result)
}
echo "\t<tr>\n\t\t<th>", $i, "</th>\n";
foreach ($row as $col) {
//if (is_object($col)) $col = $col->__toString();
echo "\t\t<td>", htmlSpecialChars($col), "</td>\n";
}
echo "\t</tr>\n";
Expand Down
4 changes: 0 additions & 4 deletions src/Database/Table/ActiveRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ class ActiveRow implements \IteratorAggregate, IRow
/** @var bool */
private $dataRefreshed = FALSE;

/** @var bool */
private $isModified = FALSE;


public function __construct(array $data, Selection $table)
{
Expand Down Expand Up @@ -175,7 +172,6 @@ public function update($data)
->wherePrimary($this->getPrimary());

if ($selection->update($data)) {
$this->isModified = TRUE;
$selection->select('*');
if (($row = $selection->fetch()) === FALSE) {
throw new Nette\InvalidStateException('Database refetch failed; row does not exist!');
Expand Down

0 comments on commit 5b7bf41

Please sign in to comment.