mirror of
https://github.com/dg/dibi.git
synced 2025-08-11 16:44:30 +02:00
- phpDoc simplified
This commit is contained in:
@@ -37,17 +37,11 @@
|
||||
class DibiMsSqlDriver extends DibiObject implements IDibiDriver
|
||||
{
|
||||
|
||||
/**
|
||||
* Connection resource.
|
||||
* @var resource
|
||||
*/
|
||||
/** @var resource Connection resource */
|
||||
private $connection;
|
||||
|
||||
|
||||
/**
|
||||
* Resultset resource.
|
||||
* @var resource
|
||||
*/
|
||||
/** @var resource Resultset resource */
|
||||
private $resultSet;
|
||||
|
||||
|
||||
@@ -66,7 +60,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Connects to a database.
|
||||
*
|
||||
* @return void
|
||||
* @throws DibiException
|
||||
*/
|
||||
@@ -95,7 +88,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Disconnects from a database.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function disconnect()
|
||||
@@ -107,7 +99,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Executes the SQL query.
|
||||
*
|
||||
* @param string SQL statement.
|
||||
* @return IDibiDriver|NULL
|
||||
* @throws DibiDriverException
|
||||
@@ -127,7 +118,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Gets the number of affected rows by the last INSERT, UPDATE or DELETE query.
|
||||
*
|
||||
* @return int|FALSE number of rows or FALSE on error
|
||||
*/
|
||||
public function affectedRows()
|
||||
@@ -139,7 +129,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
|
||||
*
|
||||
* @return int|FALSE int on success or FALSE on failure
|
||||
*/
|
||||
public function insertId($sequence)
|
||||
@@ -187,7 +176,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns the connection resource.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getResource()
|
||||
@@ -203,7 +191,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Encodes data for use in an SQL statement.
|
||||
*
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...)
|
||||
* @return string encoded value
|
||||
@@ -239,7 +226,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Decodes data from result set.
|
||||
*
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_BINARY)
|
||||
* @return string decoded value
|
||||
@@ -254,7 +240,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Injects LIMIT/OFFSET to the SQL query.
|
||||
*
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
@@ -280,7 +265,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns the number of rows in a result set.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function rowCount()
|
||||
@@ -292,10 +276,9 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Fetches the row at current position and moves the internal cursor to the next position.
|
||||
* internal usage only
|
||||
*
|
||||
* @param bool TRUE for associative array, FALSE for numeric
|
||||
* @return array array on success, nonarray if no next record
|
||||
* @internal
|
||||
*/
|
||||
public function fetch($assoc)
|
||||
{
|
||||
@@ -306,7 +289,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Moves cursor position without fetching row.
|
||||
*
|
||||
* @param int the 0-based cursor pos to seek to
|
||||
* @return boolean TRUE on success, FALSE if unable to seek to specified record
|
||||
* @throws DibiException
|
||||
@@ -320,7 +302,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Frees the resources allocated for this result set.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function free()
|
||||
@@ -333,7 +314,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns metadata for all columns in a result set.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getColumnsMeta()
|
||||
@@ -356,7 +336,6 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns the result set resource.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getResultResource()
|
||||
|
@@ -43,24 +43,15 @@
|
||||
class DibiMySqlDriver extends DibiObject implements IDibiDriver
|
||||
{
|
||||
|
||||
/**
|
||||
* Connection resource.
|
||||
* @var resource
|
||||
*/
|
||||
/** @var resource Connection resource */
|
||||
private $connection;
|
||||
|
||||
|
||||
/**
|
||||
* Resultset resource.
|
||||
* @var resource
|
||||
*/
|
||||
/** @var resource Resultset resource */
|
||||
private $resultSet;
|
||||
|
||||
|
||||
/**
|
||||
* Is buffered (seekable and countable)?
|
||||
* @var bool
|
||||
*/
|
||||
/** @var bool Is buffered (seekable and countable)? */
|
||||
private $buffered;
|
||||
|
||||
|
||||
@@ -79,7 +70,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Connects to a database.
|
||||
*
|
||||
* @return void
|
||||
* @throws DibiException
|
||||
*/
|
||||
@@ -153,7 +143,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Disconnects from a database.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function disconnect()
|
||||
@@ -165,7 +154,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Executes the SQL query.
|
||||
*
|
||||
* @param string SQL statement.
|
||||
* @return IDibiDriver|NULL
|
||||
* @throws DibiDriverException
|
||||
@@ -189,7 +177,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Gets the number of affected rows by the last INSERT, UPDATE or DELETE query.
|
||||
*
|
||||
* @return int|FALSE number of rows or FALSE on error
|
||||
*/
|
||||
public function affectedRows()
|
||||
@@ -201,7 +188,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
|
||||
*
|
||||
* @return int|FALSE int on success or FALSE on failure
|
||||
*/
|
||||
public function insertId($sequence)
|
||||
@@ -249,7 +235,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns the connection resource.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getResource()
|
||||
@@ -265,7 +250,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Encodes data for use in an SQL statement.
|
||||
*
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...)
|
||||
* @return string encoded value
|
||||
@@ -301,7 +285,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Decodes data from result set.
|
||||
*
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_BINARY)
|
||||
* @return string decoded value
|
||||
@@ -316,7 +299,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Injects LIMIT/OFFSET to the SQL query.
|
||||
*
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
@@ -339,7 +321,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns the number of rows in a result set.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function rowCount()
|
||||
@@ -354,10 +335,9 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Fetches the row at current position and moves the internal cursor to the next position.
|
||||
* internal usage only
|
||||
*
|
||||
* @param bool TRUE for associative array, FALSE for numeric
|
||||
* @return array array on success, nonarray if no next record
|
||||
* @internal
|
||||
*/
|
||||
public function fetch($assoc)
|
||||
{
|
||||
@@ -368,7 +348,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Moves cursor position without fetching row.
|
||||
*
|
||||
* @param int the 0-based cursor pos to seek to
|
||||
* @return boolean TRUE on success, FALSE if unable to seek to specified record
|
||||
* @throws DibiException
|
||||
@@ -386,7 +365,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Frees the resources allocated for this result set.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function free()
|
||||
@@ -399,7 +377,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns metadata for all columns in a result set.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getColumnsMeta()
|
||||
@@ -423,7 +400,6 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns the result set resource.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getResultResource()
|
||||
|
@@ -43,24 +43,15 @@
|
||||
class DibiMySqliDriver extends DibiObject implements IDibiDriver
|
||||
{
|
||||
|
||||
/**
|
||||
* Connection resource.
|
||||
* @var mysqli
|
||||
*/
|
||||
/** @var mysqli Connection resource */
|
||||
private $connection;
|
||||
|
||||
|
||||
/**
|
||||
* Resultset resource.
|
||||
* @var mysqli_result
|
||||
*/
|
||||
/** @var mysqli_result Resultset resource */
|
||||
private $resultSet;
|
||||
|
||||
|
||||
/**
|
||||
* Is buffered (seekable and countable)?
|
||||
* @var bool
|
||||
*/
|
||||
/** @var bool Is buffered (seekable and countable)? */
|
||||
private $buffered;
|
||||
|
||||
|
||||
@@ -79,7 +70,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Connects to a database.
|
||||
*
|
||||
* @return void
|
||||
* @throws DibiException
|
||||
*/
|
||||
@@ -141,7 +131,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Disconnects from a database.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function disconnect()
|
||||
@@ -153,7 +142,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Executes the SQL query.
|
||||
*
|
||||
* @param string SQL statement.
|
||||
* @return IDibiDriver|NULL
|
||||
* @throws DibiDriverException
|
||||
@@ -173,7 +161,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Gets the number of affected rows by the last INSERT, UPDATE or DELETE query.
|
||||
*
|
||||
* @return int|FALSE number of rows or FALSE on error
|
||||
*/
|
||||
public function affectedRows()
|
||||
@@ -185,7 +172,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
|
||||
*
|
||||
* @return int|FALSE int on success or FALSE on failure
|
||||
*/
|
||||
public function insertId($sequence)
|
||||
@@ -233,7 +219,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns the connection resource.
|
||||
*
|
||||
* @return mysqli
|
||||
*/
|
||||
public function getResource()
|
||||
@@ -249,7 +234,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Encodes data for use in an SQL statement.
|
||||
*
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...)
|
||||
* @return string encoded value
|
||||
@@ -284,7 +268,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Decodes data from result set.
|
||||
*
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_BINARY)
|
||||
* @return string decoded value
|
||||
@@ -299,7 +282,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Injects LIMIT/OFFSET to the SQL query.
|
||||
*
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
@@ -322,7 +304,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns the number of rows in a result set.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function rowCount()
|
||||
@@ -337,10 +318,9 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Fetches the row at current position and moves the internal cursor to the next position.
|
||||
* internal usage only
|
||||
*
|
||||
* @param bool TRUE for associative array, FALSE for numeric
|
||||
* @return array array on success, nonarray if no next record
|
||||
* @internal
|
||||
*/
|
||||
public function fetch($assoc)
|
||||
{
|
||||
@@ -351,7 +331,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Moves cursor position without fetching row.
|
||||
*
|
||||
* @param int the 0-based cursor pos to seek to
|
||||
* @return boolean TRUE on success, FALSE if unable to seek to specified record
|
||||
* @throws DibiException
|
||||
@@ -368,7 +347,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Frees the resources allocated for this result set.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function free()
|
||||
@@ -381,7 +359,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns metadata for all columns in a result set.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getColumnsMeta()
|
||||
@@ -415,7 +392,6 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns the result set resource.
|
||||
*
|
||||
* @return mysqli_result
|
||||
*/
|
||||
public function getResultResource()
|
||||
|
@@ -36,24 +36,15 @@
|
||||
class DibiOdbcDriver extends DibiObject implements IDibiDriver
|
||||
{
|
||||
|
||||
/**
|
||||
* Connection resource.
|
||||
* @var resource
|
||||
*/
|
||||
/** @var resource Connection resource */
|
||||
private $connection;
|
||||
|
||||
|
||||
/**
|
||||
* Resultset resource.
|
||||
* @var resource
|
||||
*/
|
||||
/** @var resource Resultset resource */
|
||||
private $resultSet;
|
||||
|
||||
|
||||
/**
|
||||
* Cursor.
|
||||
* @var int
|
||||
*/
|
||||
/** @var int Cursor */
|
||||
private $row = 0;
|
||||
|
||||
|
||||
@@ -72,7 +63,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Connects to a database.
|
||||
*
|
||||
* @return void
|
||||
* @throws DibiException
|
||||
*/
|
||||
@@ -101,7 +91,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Disconnects from a database.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function disconnect()
|
||||
@@ -113,7 +102,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Executes the SQL query.
|
||||
*
|
||||
* @param string SQL statement.
|
||||
* @return IDibiDriver|NULL
|
||||
* @throws DibiDriverException
|
||||
@@ -133,7 +121,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Gets the number of affected rows by the last INSERT, UPDATE or DELETE query.
|
||||
*
|
||||
* @return int|FALSE number of rows or FALSE on error
|
||||
*/
|
||||
public function affectedRows()
|
||||
@@ -145,7 +132,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
|
||||
*
|
||||
* @return int|FALSE int on success or FALSE on failure
|
||||
*/
|
||||
public function insertId($sequence)
|
||||
@@ -201,7 +187,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns the connection resource.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getResource()
|
||||
@@ -217,7 +202,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Encodes data for use in an SQL statement.
|
||||
*
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...)
|
||||
* @return string encoded value
|
||||
@@ -252,7 +236,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Decodes data from result set.
|
||||
*
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_BINARY)
|
||||
* @return string decoded value
|
||||
@@ -267,7 +250,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Injects LIMIT/OFFSET to the SQL query.
|
||||
*
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
@@ -291,7 +273,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns the number of rows in a result set.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function rowCount()
|
||||
@@ -304,10 +285,9 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Fetches the row at current position and moves the internal cursor to the next position.
|
||||
* internal usage only
|
||||
*
|
||||
* @param bool TRUE for associative array, FALSE for numeric
|
||||
* @return array array on success, nonarray if no next record
|
||||
* @internal
|
||||
*/
|
||||
public function fetch($assoc)
|
||||
{
|
||||
@@ -327,7 +307,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Moves cursor position without fetching row.
|
||||
*
|
||||
* @param int the 0-based cursor pos to seek to
|
||||
* @return boolean TRUE on success, FALSE if unable to seek to specified record
|
||||
* @throws DibiException
|
||||
@@ -342,7 +321,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Frees the resources allocated for this result set.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function free()
|
||||
@@ -355,7 +333,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns metadata for all columns in a result set.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getColumnsMeta()
|
||||
@@ -377,7 +354,6 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns the result set resource.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getResultResource()
|
||||
|
@@ -36,23 +36,15 @@
|
||||
class DibiOracleDriver extends DibiObject implements IDibiDriver
|
||||
{
|
||||
|
||||
/**
|
||||
* Connection resource.
|
||||
* @var resource
|
||||
*/
|
||||
/** @var resource Connection resource */
|
||||
private $connection;
|
||||
|
||||
|
||||
/**
|
||||
* Resultset resource.
|
||||
* @var resource
|
||||
*/
|
||||
/** @var resource Resultset resource */
|
||||
private $resultSet;
|
||||
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
/** @var bool */
|
||||
private $autocommit = TRUE;
|
||||
|
||||
|
||||
@@ -71,7 +63,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Connects to a database.
|
||||
*
|
||||
* @return void
|
||||
* @throws DibiException
|
||||
*/
|
||||
@@ -94,7 +85,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Disconnects from a database.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function disconnect()
|
||||
@@ -106,7 +96,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Executes the SQL query.
|
||||
*
|
||||
* @param string SQL statement.
|
||||
* @return IDibiDriver|NULL
|
||||
* @throws DibiDriverException
|
||||
@@ -133,7 +122,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Gets the number of affected rows by the last INSERT, UPDATE or DELETE query.
|
||||
*
|
||||
* @return int|FALSE number of rows or FALSE on error
|
||||
*/
|
||||
public function affectedRows()
|
||||
@@ -145,7 +133,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
|
||||
*
|
||||
* @return int|FALSE int on success or FALSE on failure
|
||||
*/
|
||||
public function insertId($sequence)
|
||||
@@ -201,7 +188,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns the connection resource.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getResource()
|
||||
@@ -217,7 +203,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Encodes data for use in an SQL statement.
|
||||
*
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...)
|
||||
* @return string encoded value
|
||||
@@ -253,7 +238,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Decodes data from result set.
|
||||
*
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_BINARY)
|
||||
* @return string decoded value
|
||||
@@ -268,7 +252,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Injects LIMIT/OFFSET to the SQL query.
|
||||
*
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
@@ -288,7 +271,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns the number of rows in a result set.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function rowCount()
|
||||
@@ -300,10 +282,9 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Fetches the row at current position and moves the internal cursor to the next position.
|
||||
* internal usage only
|
||||
*
|
||||
* @param bool TRUE for associative array, FALSE for numeric
|
||||
* @return array array on success, nonarray if no next record
|
||||
* @internal
|
||||
*/
|
||||
public function fetch($assoc)
|
||||
{
|
||||
@@ -314,7 +295,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Moves cursor position without fetching row.
|
||||
*
|
||||
* @param int the 0-based cursor pos to seek to
|
||||
* @return boolean TRUE on success, FALSE if unable to seek to specified record
|
||||
* @throws DibiException
|
||||
@@ -328,7 +308,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Frees the resources allocated for this result set.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function free()
|
||||
@@ -341,7 +320,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns metadata for all columns in a result set.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getColumnsMeta()
|
||||
@@ -363,7 +341,6 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns the result set resource.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getResultResource()
|
||||
|
@@ -37,24 +37,15 @@
|
||||
class DibiPdoDriver extends DibiObject implements IDibiDriver
|
||||
{
|
||||
|
||||
/**
|
||||
* Connection resource.
|
||||
* @var PDO
|
||||
*/
|
||||
/** @var PDO Connection resource */
|
||||
private $connection;
|
||||
|
||||
|
||||
/**
|
||||
* Resultset resource.
|
||||
* @var PDOStatement
|
||||
*/
|
||||
/** @var PDOStatement Resultset resource */
|
||||
private $resultSet;
|
||||
|
||||
|
||||
/**
|
||||
* Affected rows.
|
||||
* @var int|FALSE
|
||||
*/
|
||||
/** @var int|FALSE Affected rows */
|
||||
private $affectedRows = FALSE;
|
||||
|
||||
|
||||
@@ -73,7 +64,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Connects to a database.
|
||||
*
|
||||
* @return void
|
||||
* @throws DibiException
|
||||
*/
|
||||
@@ -104,7 +94,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Disconnects from a database.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function disconnect()
|
||||
@@ -116,7 +105,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Executes the SQL query.
|
||||
*
|
||||
* @param string SQL statement.
|
||||
* @return IDibiDriver|NULL
|
||||
* @throws DibiDriverException
|
||||
@@ -155,7 +143,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Gets the number of affected rows by the last INSERT, UPDATE or DELETE query.
|
||||
*
|
||||
* @return int|FALSE number of rows or FALSE on error
|
||||
*/
|
||||
public function affectedRows()
|
||||
@@ -167,7 +154,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
|
||||
*
|
||||
* @return int|FALSE int on success or FALSE on failure
|
||||
*/
|
||||
public function insertId($sequence)
|
||||
@@ -224,7 +210,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns the connection resource.
|
||||
*
|
||||
* @return PDO
|
||||
*/
|
||||
public function getResource()
|
||||
@@ -240,7 +225,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Encodes data for use in an SQL statement.
|
||||
*
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...)
|
||||
* @return string encoded value
|
||||
@@ -300,7 +284,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Decodes data from result set.
|
||||
*
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_BINARY)
|
||||
* @return string decoded value
|
||||
@@ -315,7 +298,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Injects LIMIT/OFFSET to the SQL query.
|
||||
*
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
@@ -334,7 +316,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns the number of rows in a result set.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function rowCount()
|
||||
@@ -346,10 +327,9 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Fetches the row at current position and moves the internal cursor to the next position.
|
||||
* internal usage only
|
||||
*
|
||||
* @param bool TRUE for associative array, FALSE for numeric
|
||||
* @return array array on success, nonarray if no next record
|
||||
* @internal
|
||||
*/
|
||||
public function fetch($assoc)
|
||||
{
|
||||
@@ -360,7 +340,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Moves cursor position without fetching row.
|
||||
*
|
||||
* @param int the 0-based cursor pos to seek to
|
||||
* @return boolean TRUE on success, FALSE if unable to seek to specified record
|
||||
* @throws DibiException
|
||||
@@ -374,7 +353,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Frees the resources allocated for this result set.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function free()
|
||||
@@ -386,7 +364,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns metadata for all columns in a result set.
|
||||
*
|
||||
* @return array
|
||||
* @throws DibiException
|
||||
*/
|
||||
@@ -414,7 +391,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns the result set resource.
|
||||
*
|
||||
* @return PDOStatement
|
||||
*/
|
||||
public function getResultResource()
|
||||
|
@@ -37,24 +37,15 @@
|
||||
class DibiPostgreDriver extends DibiObject implements IDibiDriver
|
||||
{
|
||||
|
||||
/**
|
||||
* Connection resource.
|
||||
* @var resource
|
||||
*/
|
||||
/** @var resource Connection resource */
|
||||
private $connection;
|
||||
|
||||
|
||||
/**
|
||||
* Resultset resource.
|
||||
* @var resource
|
||||
*/
|
||||
/** @var resource Resultset resource */
|
||||
private $resultSet;
|
||||
|
||||
|
||||
/**
|
||||
* Escape method.
|
||||
* @var bool
|
||||
*/
|
||||
/** @var bool Escape method */
|
||||
private $escMethod = FALSE;
|
||||
|
||||
|
||||
@@ -73,7 +64,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Connects to a database.
|
||||
*
|
||||
* @return void
|
||||
* @throws DibiException
|
||||
*/
|
||||
@@ -121,7 +111,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Disconnects from a database.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function disconnect()
|
||||
@@ -133,7 +122,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Executes the SQL query.
|
||||
*
|
||||
* @param string SQL statement.
|
||||
* @param bool update affected rows?
|
||||
* @return IDibiDriver|NULL
|
||||
@@ -154,7 +142,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Gets the number of affected rows by the last INSERT, UPDATE or DELETE query.
|
||||
*
|
||||
* @return int|FALSE number of rows or FALSE on error
|
||||
*/
|
||||
public function affectedRows()
|
||||
@@ -166,7 +153,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
|
||||
*
|
||||
* @return int|FALSE int on success or FALSE on failure
|
||||
*/
|
||||
public function insertId($sequence)
|
||||
@@ -225,7 +211,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns the connection resource.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getResource()
|
||||
@@ -241,7 +226,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Encodes data for use in an SQL statement.
|
||||
*
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...)
|
||||
* @return string encoded value
|
||||
@@ -292,7 +276,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Decodes data from result set.
|
||||
*
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_BINARY)
|
||||
* @return string decoded value
|
||||
@@ -313,7 +296,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Injects LIMIT/OFFSET to the SQL query.
|
||||
*
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
@@ -336,7 +318,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns the number of rows in a result set.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function rowCount()
|
||||
@@ -348,10 +329,9 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Fetches the row at current position and moves the internal cursor to the next position.
|
||||
* internal usage only
|
||||
*
|
||||
* @param bool TRUE for associative array, FALSE for numeric
|
||||
* @return array array on success, nonarray if no next record
|
||||
* @internal
|
||||
*/
|
||||
public function fetch($assoc)
|
||||
{
|
||||
@@ -362,7 +342,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Moves cursor position without fetching row.
|
||||
*
|
||||
* @param int the 0-based cursor pos to seek to
|
||||
* @return boolean TRUE on success, FALSE if unable to seek to specified record
|
||||
* @throws DibiException
|
||||
@@ -376,7 +355,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Frees the resources allocated for this result set.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function free()
|
||||
@@ -389,7 +367,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns metadata for all columns in a result set.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getColumnsMeta()
|
||||
@@ -413,7 +390,6 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns the result set resource.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getResultResource()
|
||||
|
@@ -37,31 +37,19 @@
|
||||
class DibiSqliteDriver extends DibiObject implements IDibiDriver
|
||||
{
|
||||
|
||||
/**
|
||||
* Connection resource.
|
||||
* @var resource
|
||||
*/
|
||||
/** @var resource Connection resource */
|
||||
private $connection;
|
||||
|
||||
|
||||
/**
|
||||
* Resultset resource.
|
||||
* @var resource
|
||||
*/
|
||||
/** @var resource Resultset resource */
|
||||
private $resultSet;
|
||||
|
||||
|
||||
/**
|
||||
* Is buffered (seekable and countable)?
|
||||
* @var bool
|
||||
*/
|
||||
/** @var bool Is buffered (seekable and countable)? */
|
||||
private $buffered;
|
||||
|
||||
|
||||
/**
|
||||
* Date and datetime format.
|
||||
* @var string
|
||||
*/
|
||||
/** @var string Date and datetime format */
|
||||
private $fmtDate, $fmtDateTime;
|
||||
|
||||
|
||||
@@ -80,7 +68,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Connects to a database.
|
||||
*
|
||||
* @return void
|
||||
* @throws DibiException
|
||||
*/
|
||||
@@ -108,7 +95,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Disconnects from a database.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function disconnect()
|
||||
@@ -120,7 +106,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Executes the SQL query.
|
||||
*
|
||||
* @param string SQL statement.
|
||||
* @return IDibiDriver|NULL
|
||||
* @throws DibiDriverException
|
||||
@@ -144,7 +129,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Gets the number of affected rows by the last INSERT, UPDATE or DELETE query.
|
||||
*
|
||||
* @return int|FALSE number of rows or FALSE on error
|
||||
*/
|
||||
public function affectedRows()
|
||||
@@ -156,7 +140,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
|
||||
*
|
||||
* @return int|FALSE int on success or FALSE on failure
|
||||
*/
|
||||
public function insertId($sequence)
|
||||
@@ -204,7 +187,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns the connection resource.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getResource()
|
||||
@@ -220,7 +202,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Encodes data for use in an SQL statement.
|
||||
*
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, ...)
|
||||
* @return string encoded value
|
||||
@@ -254,7 +235,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Decodes data from result set.
|
||||
*
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_BINARY)
|
||||
* @return string decoded value
|
||||
@@ -269,7 +249,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Injects LIMIT/OFFSET to the SQL query.
|
||||
*
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
@@ -289,7 +268,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns the number of rows in a result set.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function rowCount()
|
||||
@@ -304,10 +282,9 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Fetches the row at current position and moves the internal cursor to the next position.
|
||||
* internal usage only
|
||||
*
|
||||
* @param bool TRUE for associative array, FALSE for numeric
|
||||
* @return array array on success, nonarray if no next record
|
||||
* @internal
|
||||
*/
|
||||
public function fetch($assoc)
|
||||
{
|
||||
@@ -326,7 +303,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Moves cursor position without fetching row.
|
||||
*
|
||||
* @param int the 0-based cursor pos to seek to
|
||||
* @return boolean TRUE on success, FALSE if unable to seek to specified record
|
||||
* @throws DibiException
|
||||
@@ -343,7 +319,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Frees the resources allocated for this result set.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function free()
|
||||
@@ -355,7 +330,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns metadata for all columns in a result set.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getColumnsMeta()
|
||||
@@ -379,7 +353,6 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Returns the result set resource.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getResultResource()
|
||||
|
Reference in New Issue
Block a user