1
0
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:
David Grudl
2010-11-02 13:59:05 +01:00
parent 33ef22b488
commit 32baabdeac
12 changed files with 179 additions and 12 deletions

View File

@@ -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**/