mirror of
https://github.com/dg/dibi.git
synced 2025-08-21 05:11:49 +02:00
added low-level methods createResultDriver() and DibiConnection::createResultSet()
This commit is contained in:
@@ -104,7 +104,7 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver, IDibiResultDrive
|
||||
throw new DibiDriverException(odbc_errormsg($this->connection) . ' ' . odbc_error($this->connection), 0, $sql);
|
||||
}
|
||||
|
||||
return is_resource($this->resultSet) ? clone $this : NULL;
|
||||
return is_resource($this->resultSet) ? $this->createResultDriver($this->resultSet) : NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -211,6 +211,20 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver, IDibiResultDrive
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 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