mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 14:26:54 +08:00
db Command performance tweak
This commit is contained in:
@ -310,12 +310,13 @@ class Command extends Component
|
||||
return $this;
|
||||
}
|
||||
|
||||
$schema = $this->db->getSchema();
|
||||
foreach ($values as $name => $value) {
|
||||
if (is_array($value)) {
|
||||
$this->_pendingParams[$name] = $value;
|
||||
$this->params[$name] = $value[0];
|
||||
} else {
|
||||
$type = $this->db->getSchema()->getPdoType($value);
|
||||
$type = $schema->getPdoType($value);
|
||||
$this->_pendingParams[$name] = [$value, $type];
|
||||
$this->params[$name] = $value;
|
||||
}
|
||||
|
Reference in New Issue
Block a user