mirror of
https://github.com/dg/dibi.git
synced 2025-08-06 06:07:39 +02:00
drivers: removed auto-free feature
This commit is contained in:
@@ -23,9 +23,6 @@ class FirebirdResult implements Dibi\ResultDriver
|
|||||||
/** @var resource */
|
/** @var resource */
|
||||||
private $resultSet;
|
private $resultSet;
|
||||||
|
|
||||||
/** @var bool */
|
|
||||||
private $autoFree = true;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param resource $resultSet
|
* @param resource $resultSet
|
||||||
@@ -36,17 +33,6 @@ class FirebirdResult implements Dibi\ResultDriver
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Automatically frees the resources allocated for this result set.
|
|
||||||
*/
|
|
||||||
public function __destruct()
|
|
||||||
{
|
|
||||||
if ($this->autoFree && $this->getResultResource()) {
|
|
||||||
$this->free();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of rows in a result set.
|
* Returns the number of rows in a result set.
|
||||||
*/
|
*/
|
||||||
@@ -105,7 +91,6 @@ class FirebirdResult implements Dibi\ResultDriver
|
|||||||
*/
|
*/
|
||||||
public function getResultResource()
|
public function getResultResource()
|
||||||
{
|
{
|
||||||
$this->autoFree = false;
|
|
||||||
return is_resource($this->resultSet) ? $this->resultSet : null;
|
return is_resource($this->resultSet) ? $this->resultSet : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -22,9 +22,6 @@ class MySqliResult implements Dibi\ResultDriver
|
|||||||
/** @var \mysqli_result */
|
/** @var \mysqli_result */
|
||||||
private $resultSet;
|
private $resultSet;
|
||||||
|
|
||||||
/** @var bool */
|
|
||||||
private $autoFree = true;
|
|
||||||
|
|
||||||
/** @var bool Is buffered (seekable and countable)? */
|
/** @var bool Is buffered (seekable and countable)? */
|
||||||
private $buffered;
|
private $buffered;
|
||||||
|
|
||||||
@@ -36,17 +33,6 @@ class MySqliResult implements Dibi\ResultDriver
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Automatically frees the resources allocated for this result set.
|
|
||||||
*/
|
|
||||||
public function __destruct()
|
|
||||||
{
|
|
||||||
if ($this->autoFree && $this->getResultResource()) {
|
|
||||||
@$this->free();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of rows in a result set.
|
* Returns the number of rows in a result set.
|
||||||
*/
|
*/
|
||||||
@@ -136,7 +122,6 @@ class MySqliResult implements Dibi\ResultDriver
|
|||||||
*/
|
*/
|
||||||
public function getResultResource(): \mysqli_result
|
public function getResultResource(): \mysqli_result
|
||||||
{
|
{
|
||||||
$this->autoFree = false;
|
|
||||||
return $this->resultSet;
|
return $this->resultSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -22,9 +22,6 @@ class OdbcResult implements Dibi\ResultDriver
|
|||||||
/** @var resource */
|
/** @var resource */
|
||||||
private $resultSet;
|
private $resultSet;
|
||||||
|
|
||||||
/** @var bool */
|
|
||||||
private $autoFree = true;
|
|
||||||
|
|
||||||
/** @var int Cursor */
|
/** @var int Cursor */
|
||||||
private $row = 0;
|
private $row = 0;
|
||||||
|
|
||||||
@@ -38,17 +35,6 @@ class OdbcResult implements Dibi\ResultDriver
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Automatically frees the resources allocated for this result set.
|
|
||||||
*/
|
|
||||||
public function __destruct()
|
|
||||||
{
|
|
||||||
if ($this->autoFree && $this->getResultResource()) {
|
|
||||||
$this->free();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of rows in a result set.
|
* Returns the number of rows in a result set.
|
||||||
*/
|
*/
|
||||||
@@ -129,7 +115,6 @@ class OdbcResult implements Dibi\ResultDriver
|
|||||||
*/
|
*/
|
||||||
public function getResultResource()
|
public function getResultResource()
|
||||||
{
|
{
|
||||||
$this->autoFree = false;
|
|
||||||
return is_resource($this->resultSet) ? $this->resultSet : null;
|
return is_resource($this->resultSet) ? $this->resultSet : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -22,9 +22,6 @@ class OracleResult implements Dibi\ResultDriver
|
|||||||
/** @var resource */
|
/** @var resource */
|
||||||
private $resultSet;
|
private $resultSet;
|
||||||
|
|
||||||
/** @var bool */
|
|
||||||
private $autoFree = true;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param resource $resultSet
|
* @param resource $resultSet
|
||||||
@@ -35,17 +32,6 @@ class OracleResult implements Dibi\ResultDriver
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Automatically frees the resources allocated for this result set.
|
|
||||||
*/
|
|
||||||
public function __destruct()
|
|
||||||
{
|
|
||||||
if ($this->autoFree && $this->getResultResource()) {
|
|
||||||
$this->free();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of rows in a result set.
|
* Returns the number of rows in a result set.
|
||||||
*/
|
*/
|
||||||
@@ -111,7 +97,6 @@ class OracleResult implements Dibi\ResultDriver
|
|||||||
*/
|
*/
|
||||||
public function getResultResource()
|
public function getResultResource()
|
||||||
{
|
{
|
||||||
$this->autoFree = false;
|
|
||||||
return is_resource($this->resultSet) ? $this->resultSet : null;
|
return is_resource($this->resultSet) ? $this->resultSet : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -24,9 +24,6 @@ class PostgreResult implements Dibi\ResultDriver
|
|||||||
/** @var resource|PgSql\Result */
|
/** @var resource|PgSql\Result */
|
||||||
private $resultSet;
|
private $resultSet;
|
||||||
|
|
||||||
/** @var bool */
|
|
||||||
private $autoFree = true;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param resource|PgSql\Result $resultSet
|
* @param resource|PgSql\Result $resultSet
|
||||||
@@ -37,17 +34,6 @@ class PostgreResult implements Dibi\ResultDriver
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Automatically frees the resources allocated for this result set.
|
|
||||||
*/
|
|
||||||
public function __destruct()
|
|
||||||
{
|
|
||||||
if ($this->autoFree && $this->getResultResource()) {
|
|
||||||
$this->free();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of rows in a result set.
|
* Returns the number of rows in a result set.
|
||||||
*/
|
*/
|
||||||
@@ -114,7 +100,6 @@ class PostgreResult implements Dibi\ResultDriver
|
|||||||
*/
|
*/
|
||||||
public function getResultResource()
|
public function getResultResource()
|
||||||
{
|
{
|
||||||
$this->autoFree = false;
|
|
||||||
return is_resource($this->resultSet) || $this->resultSet instanceof PgSql\Result
|
return is_resource($this->resultSet) || $this->resultSet instanceof PgSql\Result
|
||||||
? $this->resultSet
|
? $this->resultSet
|
||||||
: null;
|
: null;
|
||||||
|
@@ -23,9 +23,6 @@ class SqliteResult implements Dibi\ResultDriver
|
|||||||
/** @var \SQLite3Result */
|
/** @var \SQLite3Result */
|
||||||
private $resultSet;
|
private $resultSet;
|
||||||
|
|
||||||
/** @var bool */
|
|
||||||
private $autoFree = true;
|
|
||||||
|
|
||||||
|
|
||||||
public function __construct(\SQLite3Result $resultSet)
|
public function __construct(\SQLite3Result $resultSet)
|
||||||
{
|
{
|
||||||
@@ -33,17 +30,6 @@ class SqliteResult implements Dibi\ResultDriver
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Automatically frees the resources allocated for this result set.
|
|
||||||
*/
|
|
||||||
public function __destruct()
|
|
||||||
{
|
|
||||||
if ($this->autoFree && $this->getResultResource()) {
|
|
||||||
@$this->free();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of rows in a result set.
|
* Returns the number of rows in a result set.
|
||||||
* @throws Dibi\NotSupportedException
|
* @throws Dibi\NotSupportedException
|
||||||
@@ -109,7 +95,6 @@ class SqliteResult implements Dibi\ResultDriver
|
|||||||
*/
|
*/
|
||||||
public function getResultResource(): \SQLite3Result
|
public function getResultResource(): \SQLite3Result
|
||||||
{
|
{
|
||||||
$this->autoFree = false;
|
|
||||||
return $this->resultSet;
|
return $this->resultSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -22,9 +22,6 @@ class SqlsrvResult implements Dibi\ResultDriver
|
|||||||
/** @var resource */
|
/** @var resource */
|
||||||
private $resultSet;
|
private $resultSet;
|
||||||
|
|
||||||
/** @var bool */
|
|
||||||
private $autoFree = true;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param resource $resultSet
|
* @param resource $resultSet
|
||||||
@@ -35,17 +32,6 @@ class SqlsrvResult implements Dibi\ResultDriver
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Automatically frees the resources allocated for this result set.
|
|
||||||
*/
|
|
||||||
public function __destruct()
|
|
||||||
{
|
|
||||||
if ($this->autoFree && $this->getResultResource()) {
|
|
||||||
$this->free();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of rows in a result set.
|
* Returns the number of rows in a result set.
|
||||||
*/
|
*/
|
||||||
@@ -107,7 +93,6 @@ class SqlsrvResult implements Dibi\ResultDriver
|
|||||||
*/
|
*/
|
||||||
public function getResultResource()
|
public function getResultResource()
|
||||||
{
|
{
|
||||||
$this->autoFree = false;
|
|
||||||
return is_resource($this->resultSet) ? $this->resultSet : null;
|
return is_resource($this->resultSet) ? $this->resultSet : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user