Skip to content

Commit 01db8a8

Browse files
committed
Added support to configure commandClass in Connection;
1 parent 59b22ef commit 01db8a8

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

src/Connection.php

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,28 +21,20 @@ class Connection extends \yii\db\Connection
2121
public $schemaMap = [
2222
'firebird' => 'edgardmessias\db\firebird\Schema', // Firebird
2323
];
24-
public $pdoClass = 'edgardmessias\db\firebird\PdoAdapter';
2524

2625
/**
27-
* @var Transaction the currently active transaction
26+
* @inheritdoc
2827
*/
29-
private $_transaction;
28+
public $pdoClass = 'edgardmessias\db\firebird\PdoAdapter';
3029

3130
/**
32-
* Creates a command for execution.
33-
* @param string $sql the SQL statement to be executed
34-
* @param array $params the parameters to be bound to the SQL statement
35-
* @return Command the DB command
31+
* @inheritdoc
3632
*/
37-
public function createCommand($sql = null, $params = [])
38-
{
39-
$command = new Command([
40-
'db' => $this,
41-
'sql' => $sql,
42-
]);
43-
44-
return $command->bindValues($params);
45-
}
33+
public $commandClass = 'edgardmessias\db\firebird\Command';
34+
/**
35+
* @var Transaction the currently active transaction
36+
*/
37+
private $_transaction;
4638

4739
/**
4840
* Returns the currently active transaction.

0 commit comments

Comments
 (0)