mirror of
https://github.com/dg/dibi.git
synced 2025-08-20 12:51:40 +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**/
|
/********************* exporting ****************d*g**/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -535,7 +535,7 @@ class DibiResult extends DibiObject implements IDataSource
|
|||||||
{
|
{
|
||||||
$cols = array();
|
$cols = array();
|
||||||
foreach ($this->getMeta() as $info) {
|
foreach ($this->getMeta() as $info) {
|
||||||
$cols[] = new DibiColumnInfo($this->driver, $info);
|
$cols[] = new DibiColumnInfo($this->getDriver(), $info);
|
||||||
}
|
}
|
||||||
return $cols;
|
return $cols;
|
||||||
}
|
}
|
||||||
@@ -626,7 +626,7 @@ class DibiResult extends DibiObject implements IDataSource
|
|||||||
private function getDriver()
|
private function getDriver()
|
||||||
{
|
{
|
||||||
if ($this->driver === NULL) {
|
if ($this->driver === NULL) {
|
||||||
throw new InvalidStateException('Resultset was released from memory.');
|
throw new InvalidStateException('Result-set was released from memory.');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->driver;
|
return $this->driver;
|
||||||
|
Reference in New Issue
Block a user