Skip to content

Commit

Permalink
Added support to configure commandClass in Connection;
Browse files Browse the repository at this point in the history
  • Loading branch information
edgardmessias committed Apr 29, 2016
1 parent 59b22ef commit 01db8a8
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions src/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,20 @@ class Connection extends \yii\db\Connection
public $schemaMap = [
'firebird' => 'edgardmessias\db\firebird\Schema', // Firebird
];
public $pdoClass = 'edgardmessias\db\firebird\PdoAdapter';

/**
* @var Transaction the currently active transaction
* @inheritdoc
*/
private $_transaction;
public $pdoClass = 'edgardmessias\db\firebird\PdoAdapter';

/**
* Creates a command for execution.
* @param string $sql the SQL statement to be executed
* @param array $params the parameters to be bound to the SQL statement
* @return Command the DB command
* @inheritdoc
*/
public function createCommand($sql = null, $params = [])
{
$command = new Command([
'db' => $this,
'sql' => $sql,
]);

return $command->bindValues($params);
}
public $commandClass = 'edgardmessias\db\firebird\Command';
/**
* @var Transaction the currently active transaction
*/
private $_transaction;

/**
* Returns the currently active transaction.
Expand Down

0 comments on commit 01db8a8

Please sign in to comment.