1
0
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:
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

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