mirror of
https://github.com/dg/dibi.git
synced 2025-08-28 08:19:48 +02:00
added low-level methods createResultDriver() and DibiConnection::createResultSet()
This commit is contained in:
@@ -131,7 +131,7 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver, IDibiResultDr
|
||||
throw new DibiDriverException(pg_last_error($this->connection), 0, $sql);
|
||||
}
|
||||
|
||||
return is_resource($this->resultSet) && pg_num_fields($this->resultSet) ? clone $this : NULL;
|
||||
return is_resource($this->resultSet) && pg_num_fields($this->resultSet) ? $this->createResultDriver($this->resultSet) : NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -241,6 +241,20 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver, IDibiResultDr
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Result set driver factory.
|
||||
* @param resource
|
||||
* @return IDibiResultDriver
|
||||
*/
|
||||
public function createResultDriver($resource)
|
||||
{
|
||||
$res = clone $this;
|
||||
$res->resultSet = $resource;
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/********************* SQL ****************d*g**/
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user