|
|
|
@ -338,6 +338,11 @@ class Connection extends Component
|
|
|
|
|
*/ |
|
|
|
|
public $masters = []; |
|
|
|
|
/** |
|
|
|
|
* @var string the class name of the [[Command]] object. |
|
|
|
|
* @since 2.0.7 |
|
|
|
|
*/ |
|
|
|
|
public $commandClass = 'yii\db\Command'; |
|
|
|
|
/** |
|
|
|
|
* @var array the configuration that should be merged with every master configuration listed in [[masters]]. |
|
|
|
|
* For example, |
|
|
|
|
* |
|
|
|
@ -353,7 +358,6 @@ class Connection extends Component
|
|
|
|
|
* ``` |
|
|
|
|
*/ |
|
|
|
|
public $masterConfig = []; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @var Transaction the currently active transaction |
|
|
|
|
*/ |
|
|
|
@ -618,9 +622,10 @@ class Connection extends Component
|
|
|
|
|
*/ |
|
|
|
|
public function createCommand($sql = null, $params = []) |
|
|
|
|
{ |
|
|
|
|
$command = new Command([ |
|
|
|
|
$command = Yii::createObject([ |
|
|
|
|
'class' => $this->commandClass, |
|
|
|
|
'db' => $this, |
|
|
|
|
'sql' => $sql, |
|
|
|
|
'sql' => $sql |
|
|
|
|
]); |
|
|
|
|
|
|
|
|
|
return $command->bindValues($params); |
|
|
|
|