mirror of
https://github.com/dg/dibi.git
synced 2025-08-11 00:24:19 +02:00
added low-level methods createResultDriver() and DibiConnection::createResultSet()
This commit is contained in:
@@ -340,7 +340,7 @@ class DibiConnection extends DibiObject
|
||||
|
||||
dibi::$sql = $sql;
|
||||
if ($res = $this->driver->query($sql)) { // intentionally =
|
||||
$res = new DibiResult($res, $this->config['result']);
|
||||
$res = $this->createResultSet($res);
|
||||
} else {
|
||||
$res = $this->driver->getAffectedRows();
|
||||
}
|
||||
@@ -466,6 +466,18 @@ class DibiConnection extends DibiObject
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Result set factory.
|
||||
* @param IDibiResultDriver
|
||||
* @return DibiResult
|
||||
*/
|
||||
public function createResultSet(IDibiResultDriver $resultDriver)
|
||||
{
|
||||
return new DibiResult($resultDriver, $this->config['result']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/********************* fluent SQL builders ****************d*g**/
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user