mirror of
https://github.com/dg/dibi.git
synced 2025-08-06 06:07:39 +02:00
removed useless annotations @param and @return
This commit is contained in:
@@ -176,7 +176,6 @@ class Connection
|
|||||||
/**
|
/**
|
||||||
* Returns configuration variable. If no $key is passed, returns the entire array.
|
* Returns configuration variable. If no $key is passed, returns the entire array.
|
||||||
* @see self::__construct
|
* @see self::__construct
|
||||||
* @param mixed $default default value to use if key not found
|
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
final public function getConfig(string $key = NULL, $default = NULL)
|
final public function getConfig(string $key = NULL, $default = NULL)
|
||||||
@@ -268,7 +267,6 @@ class Connection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes the SQL query.
|
* Executes the SQL query.
|
||||||
* @param string SQL statement.
|
|
||||||
* @return Result|int result set or number of affected rows
|
* @return Result|int result set or number of affected rows
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@@ -299,7 +297,6 @@ class Connection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the number of affected rows by the last INSERT, UPDATE or DELETE query.
|
* Gets the number of affected rows by the last INSERT, UPDATE or DELETE query.
|
||||||
* @return int number of rows
|
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getAffectedRows(): int
|
public function getAffectedRows(): int
|
||||||
@@ -315,7 +312,6 @@ class Connection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the number of affected rows. Alias for getAffectedRows().
|
* Gets the number of affected rows. Alias for getAffectedRows().
|
||||||
* @return int number of rows
|
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function affectedRows(): int
|
public function affectedRows(): int
|
||||||
@@ -326,7 +322,6 @@ class Connection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
|
* Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
|
||||||
* @param string optional sequence name
|
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getInsertId(string $sequence = NULL): int
|
public function getInsertId(string $sequence = NULL): int
|
||||||
@@ -342,7 +337,6 @@ class Connection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the ID generated for an AUTO_INCREMENT column. Alias for getInsertId().
|
* Retrieves the ID generated for an AUTO_INCREMENT column. Alias for getInsertId().
|
||||||
* @param string optional sequence name
|
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function insertId(string $sequence = NULL): int
|
public function insertId(string $sequence = NULL): int
|
||||||
@@ -353,7 +347,6 @@ class Connection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Begins a transaction (if supported).
|
* Begins a transaction (if supported).
|
||||||
* @param string optional savepoint name
|
|
||||||
*/
|
*/
|
||||||
public function begin(string $savepoint = NULL): void
|
public function begin(string $savepoint = NULL): void
|
||||||
{
|
{
|
||||||
@@ -372,7 +365,6 @@ class Connection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Commits statements in a transaction.
|
* Commits statements in a transaction.
|
||||||
* @param string optional savepoint name
|
|
||||||
*/
|
*/
|
||||||
public function commit(string $savepoint = NULL): void
|
public function commit(string $savepoint = NULL): void
|
||||||
{
|
{
|
||||||
@@ -391,7 +383,6 @@ class Connection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Rollback changes in a transaction.
|
* Rollback changes in a transaction.
|
||||||
* @param string optional savepoint name
|
|
||||||
*/
|
*/
|
||||||
public function rollback(string $savepoint = NULL): void
|
public function rollback(string $savepoint = NULL): void
|
||||||
{
|
{
|
||||||
@@ -428,9 +419,6 @@ class Connection
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param mixed column name
|
|
||||||
*/
|
|
||||||
public function select(...$args): Fluent
|
public function select(...$args): Fluent
|
||||||
{
|
{
|
||||||
return $this->command()->select(...$args);
|
return $this->command()->select(...$args);
|
||||||
@@ -548,8 +536,7 @@ class Connection
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Import SQL dump from file.
|
* Import SQL dump from file.
|
||||||
* @param string filename
|
* @param callable $onProgress function (int $count, ?float $percent): void
|
||||||
* @param callable function (int $count, ?float $percent): void
|
|
||||||
* @return int count of sql commands
|
* @return int count of sql commands
|
||||||
*/
|
*/
|
||||||
public function loadFile(string $file, callable $onProgress = NULL): int
|
public function loadFile(string $file, callable $onProgress = NULL): int
|
||||||
|
@@ -80,7 +80,6 @@ class DataSource implements IDataSource
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds conditions to query.
|
* Adds conditions to query.
|
||||||
* @param mixed conditions
|
|
||||||
*/
|
*/
|
||||||
public function where($cond): self
|
public function where($cond): self
|
||||||
{
|
{
|
||||||
@@ -98,14 +97,13 @@ class DataSource implements IDataSource
|
|||||||
/**
|
/**
|
||||||
* Selects columns to order by.
|
* Selects columns to order by.
|
||||||
* @param string|array column name or array of column names
|
* @param string|array column name or array of column names
|
||||||
* @param string sorting direction
|
|
||||||
*/
|
*/
|
||||||
public function orderBy($row, string $sorting = 'ASC'): self
|
public function orderBy($row, string $direction = 'ASC'): self
|
||||||
{
|
{
|
||||||
if (is_array($row)) {
|
if (is_array($row)) {
|
||||||
$this->sorting = $row;
|
$this->sorting = $row;
|
||||||
} else {
|
} else {
|
||||||
$this->sorting[$row] = $sorting;
|
$this->sorting[$row] = $direction;
|
||||||
}
|
}
|
||||||
$this->result = NULL;
|
$this->result = NULL;
|
||||||
return $this;
|
return $this;
|
||||||
@@ -185,7 +183,6 @@ class DataSource implements IDataSource
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetches all records from table and returns associative tree.
|
* Fetches all records from table and returns associative tree.
|
||||||
* @param string associative descriptor
|
|
||||||
*/
|
*/
|
||||||
public function fetchAssoc(string $assoc): array
|
public function fetchAssoc(string $assoc): array
|
||||||
{
|
{
|
||||||
@@ -195,7 +192,6 @@ class DataSource implements IDataSource
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetches all records from table like $key => $value pairs.
|
* Fetches all records from table like $key => $value pairs.
|
||||||
* @param string associative key
|
|
||||||
*/
|
*/
|
||||||
public function fetchPairs(string $key = NULL, string $value = NULL): array
|
public function fetchPairs(string $key = NULL, string $value = NULL): array
|
||||||
{
|
{
|
||||||
|
@@ -101,7 +101,6 @@ class FirebirdDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes the SQL query.
|
* Executes the SQL query.
|
||||||
* @param string SQL statement.
|
|
||||||
* @throws Dibi\DriverException|Dibi\Exception
|
* @throws Dibi\DriverException|Dibi\Exception
|
||||||
*/
|
*/
|
||||||
public function query(string $sql): ?Dibi\ResultDriver
|
public function query(string $sql): ?Dibi\ResultDriver
|
||||||
@@ -145,7 +144,6 @@ class FirebirdDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Begins a transaction (if supported).
|
* Begins a transaction (if supported).
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function begin(string $savepoint = NULL): void
|
public function begin(string $savepoint = NULL): void
|
||||||
@@ -160,7 +158,6 @@ class FirebirdDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Commits statements in a transaction.
|
* Commits statements in a transaction.
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function commit(string $savepoint = NULL): void
|
public function commit(string $savepoint = NULL): void
|
||||||
@@ -179,7 +176,6 @@ class FirebirdDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Rollback changes in a transaction.
|
* Rollback changes in a transaction.
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function rollback(string $savepoint = NULL): void
|
public function rollback(string $savepoint = NULL): void
|
||||||
@@ -662,7 +658,6 @@ class FirebirdDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns metadata from stored procedures and their input and output parameters.
|
* Returns metadata from stored procedures and their input and output parameters.
|
||||||
* @param string
|
|
||||||
*/
|
*/
|
||||||
public function getProceduresMeta(): array
|
public function getProceduresMeta(): array
|
||||||
{
|
{
|
||||||
|
@@ -82,7 +82,6 @@ class MsSqlDriver implements Dibi\Driver, Dibi\ResultDriver
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes the SQL query.
|
* Executes the SQL query.
|
||||||
* @param string SQL statement.
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function query(string $sql): ?Dibi\ResultDriver
|
public function query(string $sql): ?Dibi\ResultDriver
|
||||||
@@ -124,7 +123,6 @@ class MsSqlDriver implements Dibi\Driver, Dibi\ResultDriver
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Begins a transaction (if supported).
|
* Begins a transaction (if supported).
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function begin(string $savepoint = NULL): void
|
public function begin(string $savepoint = NULL): void
|
||||||
@@ -135,7 +133,6 @@ class MsSqlDriver implements Dibi\Driver, Dibi\ResultDriver
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Commits statements in a transaction.
|
* Commits statements in a transaction.
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function commit(string $savepoint = NULL): void
|
public function commit(string $savepoint = NULL): void
|
||||||
@@ -146,7 +143,6 @@ class MsSqlDriver implements Dibi\Driver, Dibi\ResultDriver
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Rollback changes in a transaction.
|
* Rollback changes in a transaction.
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function rollback(string $savepoint = NULL): void
|
public function rollback(string $savepoint = NULL): void
|
||||||
@@ -310,7 +306,6 @@ class MsSqlDriver implements Dibi\Driver, Dibi\ResultDriver
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Moves cursor position without fetching row.
|
* Moves cursor position without fetching row.
|
||||||
* @param int the 0-based cursor pos to seek to
|
|
||||||
* @return bool TRUE on success, FALSE if unable to seek to specified record
|
* @return bool TRUE on success, FALSE if unable to seek to specified record
|
||||||
*/
|
*/
|
||||||
public function seek(int $row): bool
|
public function seek(int $row): bool
|
||||||
|
@@ -142,7 +142,6 @@ class MySqliDriver implements Dibi\Driver, Dibi\ResultDriver
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes the SQL query.
|
* Executes the SQL query.
|
||||||
* @param string SQL statement.
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function query(string $sql): ?Dibi\ResultDriver
|
public function query(string $sql): ?Dibi\ResultDriver
|
||||||
@@ -214,7 +213,6 @@ class MySqliDriver implements Dibi\Driver, Dibi\ResultDriver
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Begins a transaction (if supported).
|
* Begins a transaction (if supported).
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function begin(string $savepoint = NULL): void
|
public function begin(string $savepoint = NULL): void
|
||||||
@@ -225,7 +223,6 @@ class MySqliDriver implements Dibi\Driver, Dibi\ResultDriver
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Commits statements in a transaction.
|
* Commits statements in a transaction.
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function commit(string $savepoint = NULL): void
|
public function commit(string $savepoint = NULL): void
|
||||||
@@ -236,7 +233,6 @@ class MySqliDriver implements Dibi\Driver, Dibi\ResultDriver
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Rollback changes in a transaction.
|
* Rollback changes in a transaction.
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function rollback(string $savepoint = NULL): void
|
public function rollback(string $savepoint = NULL): void
|
||||||
|
@@ -92,7 +92,6 @@ class OdbcDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes the SQL query.
|
* Executes the SQL query.
|
||||||
* @param string SQL statement.
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function query(string $sql): ?Dibi\ResultDriver
|
public function query(string $sql): ?Dibi\ResultDriver
|
||||||
@@ -131,7 +130,6 @@ class OdbcDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Begins a transaction (if supported).
|
* Begins a transaction (if supported).
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function begin(string $savepoint = NULL): void
|
public function begin(string $savepoint = NULL): void
|
||||||
@@ -144,7 +142,6 @@ class OdbcDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Commits statements in a transaction.
|
* Commits statements in a transaction.
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function commit(string $savepoint = NULL): void
|
public function commit(string $savepoint = NULL): void
|
||||||
@@ -158,7 +155,6 @@ class OdbcDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Rollback changes in a transaction.
|
* Rollback changes in a transaction.
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function rollback(string $savepoint = NULL): void
|
public function rollback(string $savepoint = NULL): void
|
||||||
|
@@ -101,7 +101,6 @@ class OracleDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes the SQL query.
|
* Executes the SQL query.
|
||||||
* @param string SQL statement.
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function query(string $sql): ?Dibi\ResultDriver
|
public function query(string $sql): ?Dibi\ResultDriver
|
||||||
@@ -164,7 +163,6 @@ class OracleDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Begins a transaction (if supported).
|
* Begins a transaction (if supported).
|
||||||
* @param string optional savepoint name
|
|
||||||
*/
|
*/
|
||||||
public function begin(string $savepoint = NULL): void
|
public function begin(string $savepoint = NULL): void
|
||||||
{
|
{
|
||||||
@@ -174,7 +172,6 @@ class OracleDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Commits statements in a transaction.
|
* Commits statements in a transaction.
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function commit(string $savepoint = NULL): void
|
public function commit(string $savepoint = NULL): void
|
||||||
@@ -189,7 +186,6 @@ class OracleDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Rollback changes in a transaction.
|
* Rollback changes in a transaction.
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function rollback(string $savepoint = NULL): void
|
public function rollback(string $savepoint = NULL): void
|
||||||
|
@@ -96,7 +96,6 @@ class PdoDriver implements Dibi\Driver, Dibi\ResultDriver
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes the SQL query.
|
* Executes the SQL query.
|
||||||
* @param string SQL statement.
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function query(string $sql): ?Dibi\ResultDriver
|
public function query(string $sql): ?Dibi\ResultDriver
|
||||||
@@ -159,7 +158,6 @@ class PdoDriver implements Dibi\Driver, Dibi\ResultDriver
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Begins a transaction (if supported).
|
* Begins a transaction (if supported).
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function begin(string $savepoint = NULL): void
|
public function begin(string $savepoint = NULL): void
|
||||||
@@ -173,7 +171,6 @@ class PdoDriver implements Dibi\Driver, Dibi\ResultDriver
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Commits statements in a transaction.
|
* Commits statements in a transaction.
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function commit(string $savepoint = NULL): void
|
public function commit(string $savepoint = NULL): void
|
||||||
@@ -187,7 +184,6 @@ class PdoDriver implements Dibi\Driver, Dibi\ResultDriver
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Rollback changes in a transaction.
|
* Rollback changes in a transaction.
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function rollback(string $savepoint = NULL): void
|
public function rollback(string $savepoint = NULL): void
|
||||||
|
@@ -203,7 +203,6 @@ class PostgreDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Begins a transaction (if supported).
|
* Begins a transaction (if supported).
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function begin(string $savepoint = NULL): void
|
public function begin(string $savepoint = NULL): void
|
||||||
@@ -214,7 +213,6 @@ class PostgreDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Commits statements in a transaction.
|
* Commits statements in a transaction.
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function commit(string $savepoint = NULL): void
|
public function commit(string $savepoint = NULL): void
|
||||||
@@ -225,7 +223,6 @@ class PostgreDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Rollback changes in a transaction.
|
* Rollback changes in a transaction.
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function rollback(string $savepoint = NULL): void
|
public function rollback(string $savepoint = NULL): void
|
||||||
|
@@ -99,7 +99,6 @@ class Sqlite3Driver implements Dibi\Driver, Dibi\ResultDriver
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes the SQL query.
|
* Executes the SQL query.
|
||||||
* @param string SQL statement.
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function query(string $sql): ?Dibi\ResultDriver
|
public function query(string $sql): ?Dibi\ResultDriver
|
||||||
@@ -166,7 +165,6 @@ class Sqlite3Driver implements Dibi\Driver, Dibi\ResultDriver
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Begins a transaction (if supported).
|
* Begins a transaction (if supported).
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function begin(string $savepoint = NULL): void
|
public function begin(string $savepoint = NULL): void
|
||||||
@@ -177,7 +175,6 @@ class Sqlite3Driver implements Dibi\Driver, Dibi\ResultDriver
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Commits statements in a transaction.
|
* Commits statements in a transaction.
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function commit(string $savepoint = NULL): void
|
public function commit(string $savepoint = NULL): void
|
||||||
@@ -188,7 +185,6 @@ class Sqlite3Driver implements Dibi\Driver, Dibi\ResultDriver
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Rollback changes in a transaction.
|
* Rollback changes in a transaction.
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function rollback(string $savepoint = NULL): void
|
public function rollback(string $savepoint = NULL): void
|
||||||
@@ -416,9 +412,6 @@ class Sqlite3Driver implements Dibi\Driver, Dibi\ResultDriver
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers an user defined function for use in SQL statements.
|
* Registers an user defined function for use in SQL statements.
|
||||||
* @param string function name
|
|
||||||
* @param mixed
|
|
||||||
* @param int num of arguments
|
|
||||||
*/
|
*/
|
||||||
public function registerFunction(string $name, callable $callback, int $numArgs = -1): void
|
public function registerFunction(string $name, callable $callback, int $numArgs = -1): void
|
||||||
{
|
{
|
||||||
@@ -428,10 +421,6 @@ class Sqlite3Driver implements Dibi\Driver, Dibi\ResultDriver
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers an aggregating user defined function for use in SQL statements.
|
* Registers an aggregating user defined function for use in SQL statements.
|
||||||
* @param string function name
|
|
||||||
* @param mixed callback called for each row of the result set
|
|
||||||
* @param mixed callback called to aggregate the "stepped" data from each row
|
|
||||||
* @param int num of arguments
|
|
||||||
*/
|
*/
|
||||||
public function registerAggregateFunction(string $name, callable $rowCallback, callable $agrCallback, int $numArgs = -1): void
|
public function registerAggregateFunction(string $name, callable $rowCallback, callable $agrCallback, int $numArgs = -1): void
|
||||||
{
|
{
|
||||||
|
@@ -101,7 +101,6 @@ class SqlsrvDriver implements Dibi\Driver, Dibi\ResultDriver
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes the SQL query.
|
* Executes the SQL query.
|
||||||
* @param string SQL statement.
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function query(string $sql): ?Dibi\ResultDriver
|
public function query(string $sql): ?Dibi\ResultDriver
|
||||||
@@ -146,7 +145,6 @@ class SqlsrvDriver implements Dibi\Driver, Dibi\ResultDriver
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Begins a transaction (if supported).
|
* Begins a transaction (if supported).
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function begin(string $savepoint = NULL): void
|
public function begin(string $savepoint = NULL): void
|
||||||
@@ -157,7 +155,6 @@ class SqlsrvDriver implements Dibi\Driver, Dibi\ResultDriver
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Commits statements in a transaction.
|
* Commits statements in a transaction.
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function commit(string $savepoint = NULL): void
|
public function commit(string $savepoint = NULL): void
|
||||||
@@ -168,7 +165,6 @@ class SqlsrvDriver implements Dibi\Driver, Dibi\ResultDriver
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Rollback changes in a transaction.
|
* Rollback changes in a transaction.
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\DriverException
|
* @throws Dibi\DriverException
|
||||||
*/
|
*/
|
||||||
public function rollback(string $savepoint = NULL): void
|
public function rollback(string $savepoint = NULL): void
|
||||||
|
@@ -114,8 +114,6 @@ class Fluent implements IDataSource
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Appends new argument to the clause.
|
* Appends new argument to the clause.
|
||||||
* @param string clause name
|
|
||||||
* @param array arguments
|
|
||||||
*/
|
*/
|
||||||
public function __call(string $clause, array $args): self
|
public function __call(string $clause, array $args): self
|
||||||
{
|
{
|
||||||
@@ -202,7 +200,6 @@ class Fluent implements IDataSource
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Switch to a clause.
|
* Switch to a clause.
|
||||||
* @param string clause name
|
|
||||||
*/
|
*/
|
||||||
public function clause(string $clause): self
|
public function clause(string $clause): self
|
||||||
{
|
{
|
||||||
@@ -217,7 +214,6 @@ class Fluent implements IDataSource
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes a clause.
|
* Removes a clause.
|
||||||
* @param string clause name
|
|
||||||
*/
|
*/
|
||||||
public function removeClause(string $clause): self
|
public function removeClause(string $clause): self
|
||||||
{
|
{
|
||||||
@@ -228,7 +224,6 @@ class Fluent implements IDataSource
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Change a SQL flag.
|
* Change a SQL flag.
|
||||||
* @param string flag name
|
|
||||||
*/
|
*/
|
||||||
public function setFlag(string $flag, bool $value = TRUE): self
|
public function setFlag(string $flag, bool $value = TRUE): self
|
||||||
{
|
{
|
||||||
@@ -244,7 +239,6 @@ class Fluent implements IDataSource
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Is a flag set?
|
* Is a flag set?
|
||||||
* @param string flag name
|
|
||||||
*/
|
*/
|
||||||
final public function getFlag(string $flag): bool
|
final public function getFlag(string $flag): bool
|
||||||
{
|
{
|
||||||
|
@@ -18,7 +18,6 @@ class Helpers
|
|||||||
/**
|
/**
|
||||||
* Prints out a syntax highlighted version of the SQL command or Result.
|
* Prints out a syntax highlighted version of the SQL command or Result.
|
||||||
* @param string|Result
|
* @param string|Result
|
||||||
* @param bool return output instead of printing it?
|
|
||||||
*/
|
*/
|
||||||
public static function dump($sql = NULL, bool $return = FALSE): string
|
public static function dump($sql = NULL, bool $return = FALSE): string
|
||||||
{
|
{
|
||||||
@@ -211,8 +210,6 @@ class Helpers
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Apply configuration alias or default values.
|
* Apply configuration alias or default values.
|
||||||
* @param array connect configuration
|
|
||||||
* @param string $alias alias key
|
|
||||||
*/
|
*/
|
||||||
public static function alias(array &$config, string $key, string $alias): void
|
public static function alias(array &$config, string $key, string $alias): void
|
||||||
{
|
{
|
||||||
|
@@ -227,7 +227,6 @@ class Result implements IDataSource
|
|||||||
* builds a tree: $tree[$val1][$index][$val2]->col3[$val3] = {record}
|
* builds a tree: $tree[$val1][$index][$val2]->col3[$val3] = {record}
|
||||||
* - associative descriptor: col1|col2->col3=col4
|
* - associative descriptor: col1|col2->col3=col4
|
||||||
* builds a tree: $tree[$val1][$val2]->col3[$val3] = val4
|
* builds a tree: $tree[$val1][$val2]->col3[$val3] = val4
|
||||||
* @param string associative descriptor
|
|
||||||
* @throws \InvalidArgumentException
|
* @throws \InvalidArgumentException
|
||||||
*/
|
*/
|
||||||
final public function fetchAssoc(string $assoc): array
|
final public function fetchAssoc(string $assoc): array
|
||||||
@@ -374,7 +373,6 @@ class Result implements IDataSource
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetches all records from table like $key => $value pairs.
|
* Fetches all records from table like $key => $value pairs.
|
||||||
* @param string associative key
|
|
||||||
* @throws \InvalidArgumentException
|
* @throws \InvalidArgumentException
|
||||||
*/
|
*/
|
||||||
final public function fetchPairs(string $key = NULL, string $value = NULL): array
|
final public function fetchPairs(string $key = NULL, string $value = NULL): array
|
||||||
@@ -503,12 +501,11 @@ class Result implements IDataSource
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Define column type.
|
* Define column type.
|
||||||
* @param string column
|
* @param string $type use constant Type::*
|
||||||
* @param string type (use constant Type::*)
|
|
||||||
*/
|
*/
|
||||||
final public function setType(string $col, string $type): self
|
final public function setType(string $column, string $type): self
|
||||||
{
|
{
|
||||||
$this->types[$col] = $type;
|
$this->types[$column] = $type;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -516,15 +513,14 @@ class Result implements IDataSource
|
|||||||
/**
|
/**
|
||||||
* Returns column type.
|
* Returns column type.
|
||||||
*/
|
*/
|
||||||
final public function getType($col): string
|
final public function getType($column): string
|
||||||
{
|
{
|
||||||
return $this->types[$col] ?? NULL;
|
return $this->types[$column] ?? NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets date format.
|
* Sets date format.
|
||||||
* @param string
|
|
||||||
*/
|
*/
|
||||||
final public function setFormat(string $type, ?string $format): self
|
final public function setFormat(string $type, ?string $format): self
|
||||||
{
|
{
|
||||||
|
@@ -101,7 +101,6 @@ trait Strict
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string method name
|
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public static function extensionMethod(string $name, callable $callback = NULL)
|
public static function extensionMethod(string $name, callable $callback = NULL)
|
||||||
|
@@ -578,8 +578,7 @@ final class Translator
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Apply substitutions to indentifier and delimites it.
|
* Apply substitutions to identifier and delimites it.
|
||||||
* @param string indentifier
|
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
public function delimite(string $value): string
|
public function delimite(string $value): string
|
||||||
|
@@ -65,8 +65,6 @@ class dibi
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new Connection object and connects it to specified database.
|
* Creates a new Connection object and connects it to specified database.
|
||||||
* @param mixed connection parameters
|
|
||||||
* @param string connection name
|
|
||||||
* @throws Dibi\Exception
|
* @throws Dibi\Exception
|
||||||
*/
|
*/
|
||||||
public static function connect(array $config = [], string $name = '0'): Dibi\Connection
|
public static function connect(array $config = [], string $name = '0'): Dibi\Connection
|
||||||
@@ -95,7 +93,6 @@ class dibi
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve active connection.
|
* Retrieve active connection.
|
||||||
* @param string connection registy name
|
|
||||||
* @throws Dibi\Exception
|
* @throws Dibi\Exception
|
||||||
*/
|
*/
|
||||||
public static function getConnection(string $name = NULL): Dibi\Connection
|
public static function getConnection(string $name = NULL): Dibi\Connection
|
||||||
@@ -142,7 +139,6 @@ class dibi
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes the SQL query - Monostate for Dibi\Connection::nativeQuery().
|
* Executes the SQL query - Monostate for Dibi\Connection::nativeQuery().
|
||||||
* @param string SQL statement.
|
|
||||||
* @return Dibi\Result|int result set or number of affected rows
|
* @return Dibi\Result|int result set or number of affected rows
|
||||||
*/
|
*/
|
||||||
public static function nativeQuery(string $sql)
|
public static function nativeQuery(string $sql)
|
||||||
@@ -242,7 +238,6 @@ class dibi
|
|||||||
/**
|
/**
|
||||||
* Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
|
* Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
|
||||||
* Monostate for Dibi\Connection::getInsertId()
|
* Monostate for Dibi\Connection::getInsertId()
|
||||||
* @param string optional sequence name
|
|
||||||
* @throws Dibi\Exception
|
* @throws Dibi\Exception
|
||||||
*/
|
*/
|
||||||
public static function getInsertId(string $sequence = NULL): int
|
public static function getInsertId(string $sequence = NULL): int
|
||||||
@@ -253,7 +248,6 @@ class dibi
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the ID generated for an AUTO_INCREMENT column. Alias for getInsertId().
|
* Retrieves the ID generated for an AUTO_INCREMENT column. Alias for getInsertId().
|
||||||
* @param string optional sequence name
|
|
||||||
* @throws Dibi\Exception
|
* @throws Dibi\Exception
|
||||||
*/
|
*/
|
||||||
public static function insertId(string $sequence = NULL): int
|
public static function insertId(string $sequence = NULL): int
|
||||||
@@ -264,7 +258,6 @@ class dibi
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Begins a transaction - Monostate for Dibi\Connection::begin().
|
* Begins a transaction - Monostate for Dibi\Connection::begin().
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\Exception
|
* @throws Dibi\Exception
|
||||||
*/
|
*/
|
||||||
public static function begin(string $savepoint = NULL): void
|
public static function begin(string $savepoint = NULL): void
|
||||||
@@ -275,7 +268,6 @@ class dibi
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Commits statements in a transaction - Monostate for Dibi\Connection::commit($savepoint = NULL).
|
* Commits statements in a transaction - Monostate for Dibi\Connection::commit($savepoint = NULL).
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\Exception
|
* @throws Dibi\Exception
|
||||||
*/
|
*/
|
||||||
public static function commit(string $savepoint = NULL): void
|
public static function commit(string $savepoint = NULL): void
|
||||||
@@ -286,7 +278,6 @@ class dibi
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Rollback changes in a transaction - Monostate for Dibi\Connection::rollback().
|
* Rollback changes in a transaction - Monostate for Dibi\Connection::rollback().
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws Dibi\Exception
|
* @throws Dibi\Exception
|
||||||
*/
|
*/
|
||||||
public static function rollback(string $savepoint = NULL): void
|
public static function rollback(string $savepoint = NULL): void
|
||||||
@@ -306,7 +297,6 @@ class dibi
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Import SQL dump from file - extreme fast!
|
* Import SQL dump from file - extreme fast!
|
||||||
* @param string filename
|
|
||||||
* @return int count of sql commands
|
* @return int count of sql commands
|
||||||
*/
|
*/
|
||||||
public static function loadFile(string $file): int
|
public static function loadFile(string $file): int
|
||||||
@@ -324,9 +314,6 @@ class dibi
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param mixed column name
|
|
||||||
*/
|
|
||||||
public static function select(...$args): Dibi\Fluent
|
public static function select(...$args): Dibi\Fluent
|
||||||
{
|
{
|
||||||
return self::getConnection()->select(...$args);
|
return self::getConnection()->select(...$args);
|
||||||
|
@@ -19,9 +19,6 @@ class Exception extends \Exception
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct a dibi exception.
|
* Construct a dibi exception.
|
||||||
* @param string Message describing the exception
|
|
||||||
* @param mixed
|
|
||||||
* @param string SQL command
|
|
||||||
*/
|
*/
|
||||||
public function __construct(string $message = '', $code = 0, string $sql = NULL)
|
public function __construct(string $message = '', $code = 0, string $sql = NULL)
|
||||||
{
|
{
|
||||||
@@ -95,9 +92,6 @@ class ProcedureException extends Exception
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct the exception.
|
* Construct the exception.
|
||||||
* @param string Message describing the exception
|
|
||||||
* @param int Some code
|
|
||||||
* @param string SQL command
|
|
||||||
*/
|
*/
|
||||||
public function __construct(string $message = NULL, int $code = 0, string $severity = NULL, $sql = NULL)
|
public function __construct(string $message = NULL, int $code = 0, string $severity = NULL, $sql = NULL)
|
||||||
{
|
{
|
||||||
|
@@ -38,7 +38,6 @@ interface Driver
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal: Executes the SQL query.
|
* Internal: Executes the SQL query.
|
||||||
* @param string SQL statement.
|
|
||||||
* @throws DriverException
|
* @throws DriverException
|
||||||
*/
|
*/
|
||||||
function query(string $sql): ?ResultDriver;
|
function query(string $sql): ?ResultDriver;
|
||||||
@@ -55,21 +54,18 @@ interface Driver
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Begins a transaction (if supported).
|
* Begins a transaction (if supported).
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws DriverException
|
* @throws DriverException
|
||||||
*/
|
*/
|
||||||
function begin(string $savepoint = NULL): void;
|
function begin(string $savepoint = NULL): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Commits statements in a transaction.
|
* Commits statements in a transaction.
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws DriverException
|
* @throws DriverException
|
||||||
*/
|
*/
|
||||||
function commit(string $savepoint = NULL): void;
|
function commit(string $savepoint = NULL): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rollback changes in a transaction.
|
* Rollback changes in a transaction.
|
||||||
* @param string optional savepoint name
|
|
||||||
* @throws DriverException
|
* @throws DriverException
|
||||||
*/
|
*/
|
||||||
function rollback(string $savepoint = NULL): void;
|
function rollback(string $savepoint = NULL): void;
|
||||||
@@ -132,7 +128,6 @@ interface ResultDriver
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Moves cursor position without fetching row.
|
* Moves cursor position without fetching row.
|
||||||
* @param int the 0-based cursor pos to seek to
|
|
||||||
* @return bool TRUE on success, FALSE if unable to seek to specified record
|
* @return bool TRUE on success, FALSE if unable to seek to specified record
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user