1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-14 01:54:08 +02:00

code formatting: 4 spaces -> tabs

This commit is contained in:
David Grudl
2008-05-12 00:30:59 +00:00
parent fd22c55639
commit 7bb5684d71
37 changed files with 5309 additions and 5309 deletions

View File

@@ -25,14 +25,14 @@
*/
interface IDibiVariable
{
/**
* Format for SQL.
*
* @param object DibiTranslator
* @param string optional modifier
* @return string SQL code
*/
public function toSql(DibiTranslator $translator, $modifier);
/**
* Format for SQL.
*
* @param object DibiTranslator
* @param string optional modifier
* @return string SQL code
*/
public function toSql(DibiTranslator $translator, $modifier);
}
@@ -45,8 +45,8 @@ interface IDibiVariable
*/
interface IDataSource extends Countable, IteratorAggregate
{
//function IteratorAggregate::getIterator();
//function Countable::count();
//function IteratorAggregate::getIterator();
//function Countable::count();
}
@@ -64,179 +64,179 @@ interface IDataSource extends Countable, IteratorAggregate
interface IDibiDriver
{
/**
* Internal: Connects to a database.
*
* @param array
* @return void
* @throws DibiException
*/
function connect(array &$config);
/**
* Internal: Connects to a database.
*
* @param array
* @return void
* @throws DibiException
*/
function connect(array &$config);
/**
* Internal: Disconnects from a database.
*
* @return void
* @throws DibiException
*/
function disconnect();
/**
* Internal: Disconnects from a database.
*
* @return void
* @throws DibiException
*/
function disconnect();
/**
* Internal: Executes the SQL query.
*
* @param string SQL statement.
* @return bool have resultset?
* @throws DibiDriverException
*/
function query($sql);
/**
* Internal: Executes the SQL query.
*
* @param string SQL statement.
* @return bool have resultset?
* @throws DibiDriverException
*/
function query($sql);
/**
* Gets the number of affected rows by the last INSERT, UPDATE or DELETE query.
*
* @return int|FALSE number of rows or FALSE on error
*/
function affectedRows();
/**
* Gets the number of affected rows by the last INSERT, UPDATE or DELETE query.
*
* @return int|FALSE number of rows or FALSE on error
*/
function affectedRows();
/**
* Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
*
* @return int|FALSE int on success or FALSE on failure
*/
function insertId($sequence);
/**
* Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
*
* @return int|FALSE int on success or FALSE on failure
*/
function insertId($sequence);
/**
* Begins a transaction (if supported).
* @return void
* @throws DibiDriverException
*/
function begin();
/**
* Begins a transaction (if supported).
* @return void
* @throws DibiDriverException
*/
function begin();
/**
* Commits statements in a transaction.
* @return void
* @throws DibiDriverException
*/
function commit();
/**
* Commits statements in a transaction.
* @return void
* @throws DibiDriverException
*/
function commit();
/**
* Rollback changes in a transaction.
* @return void
* @throws DibiDriverException
*/
function rollback();
/**
* Rollback changes in a transaction.
* @return void
* @throws DibiDriverException
*/
function rollback();
/**
* Format to SQL command.
*
* @param string value
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
* @return string formatted value
*/
function format($value, $type);
/**
* Format to SQL command.
*
* @param string value
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
* @return string formatted value
*/
function format($value, $type);
/**
* Injects LIMIT/OFFSET to the SQL query.
*
* @param string &$sql The SQL query that will be modified.
* @param int $limit
* @param int $offset
* @return void
*/
function applyLimit(&$sql, $limit, $offset);
/**
* Injects LIMIT/OFFSET to the SQL query.
*
* @param string &$sql The SQL query that will be modified.
* @param int $limit
* @param int $offset
* @return void
*/
function applyLimit(&$sql, $limit, $offset);
/**
* Returns the number of rows in a result set.
*
* @return int
*/
function rowCount();
/**
* Returns the number of rows in a result set.
*
* @return int
*/
function rowCount();
/**
* 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
*/
function seek($row);
/**
* 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
*/
function seek($row);
/**
* 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
*/
function fetch($type);
/**
* 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
*/
function fetch($type);
/**
* Frees the resources allocated for this result set.
*
* @param resource resultset resource
* @return void
*/
function free();
/**
* Frees the resources allocated for this result set.
*
* @param resource resultset resource
* @return void
*/
function free();
/**
* Returns metadata for all columns in a result set.
*
* @return array
* @throws DibiException
*/
function getColumnsMeta();
/**
* Returns metadata for all columns in a result set.
*
* @return array
* @throws DibiException
*/
function getColumnsMeta();
/**
* Returns the connection resource.
*
* @return mixed
*/
function getResource();
/**
* Returns the connection resource.
*
* @return mixed
*/
function getResource();
/**
* Returns the resultset resource.
*
* @return mixed
*/
function getResultResource();
/**
* Returns the resultset resource.
*
* @return mixed
*/
function getResultResource();
/**
* Gets a information of the current database.
*
* @return DibiReflection
*/
function getDibiReflection();
/**
* Gets a information of the current database.
*
* @return DibiReflection
*/
function getDibiReflection();
}