mirror of
https://github.com/dg/dibi.git
synced 2025-08-13 01:24:06 +02:00
added low-level methods createResultDriver() and DibiConnection::createResultSet()
This commit is contained in:
@@ -126,7 +126,7 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver, IDibiResultDriver
|
||||
throw new DibiDriverException("SQLSTATE[$err[0]]: $err[2]", $err[1], $sql);
|
||||
}
|
||||
|
||||
return clone $this;
|
||||
return $this->createResultDriver($this->resultSet);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,6 +224,20 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver, IDibiResultDriver
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Result set driver factory.
|
||||
* @param PDOStatement
|
||||
* @return IDibiResultDriver
|
||||
*/
|
||||
public function createResultDriver(PDOStatement $resource)
|
||||
{
|
||||
$res = clone $this;
|
||||
$res->resultSet = $resource;
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/********************* SQL ****************d*g**/
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user