db Command performance tweak

This commit is contained in:
laszlovl
2015-05-03 21:03:55 +02:00
committed by Carsten Brandt
parent b31b9e2411
commit 8c22270591

View File

@ -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;
}