mirror of
https://github.com/dg/dibi.git
synced 2025-08-20 04:41:26 +02:00
- added DibiDataSource::release()
This commit is contained in:
@@ -247,6 +247,17 @@ class DibiDataSource extends DibiObject implements IDataSource
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Discards the internal cache.
|
||||
* @return void
|
||||
*/
|
||||
public function release()
|
||||
{
|
||||
$this->result = $this->count = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/********************* exporting ****************d*g**/
|
||||
|
||||
|
||||
|
@@ -535,7 +535,7 @@ class DibiResult extends DibiObject implements IDataSource
|
||||
{
|
||||
$cols = array();
|
||||
foreach ($this->getMeta() as $info) {
|
||||
$cols[] = new DibiColumnInfo($this->driver, $info);
|
||||
$cols[] = new DibiColumnInfo($this->getDriver(), $info);
|
||||
}
|
||||
return $cols;
|
||||
}
|
||||
@@ -626,7 +626,7 @@ class DibiResult extends DibiObject implements IDataSource
|
||||
private function getDriver()
|
||||
{
|
||||
if ($this->driver === NULL) {
|
||||
throw new InvalidStateException('Resultset was released from memory.');
|
||||
throw new InvalidStateException('Result-set was released from memory.');
|
||||
}
|
||||
|
||||
return $this->driver;
|
||||
|
Reference in New Issue
Block a user