Commit 417ddca2 authored by Florin Patan's avatar Florin Patan

Added query micro-optimization

parent 804bd86e
...@@ -739,9 +739,19 @@ class Connection implements DriverConnection ...@@ -739,9 +739,19 @@ class Connection implements DriverConnection
} }
try { try {
$statement = call_user_func_array(array($this->_conn, 'query'), $args); switch (func_num_args()) {
case 1:
$statement = $this->_conn->query($args[0]);
break;
case 2:
$statement = $this->_conn->query($args[0], $args[1]);
break;
default:
$statement = call_user_func_array(array($this->_conn, 'query'), $args);
break;
}
} catch (\Exception $ex) { } catch (\Exception $ex) {
throw DBALException::driverExceptionDuringQuery($ex, func_get_arg(0)); throw DBALException::driverExceptionDuringQuery($ex, $args[0]);
} }
$statement->setFetchMode($this->_defaultFetchMode); $statement->setFetchMode($this->_defaultFetchMode);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment