PHP Интерфейс RedBeanPHP\Adapter

Describes the API for a RedBeanPHP Database Adapter. This interface defines the API contract for a RedBeanPHP Database Adapter.
Автор: Gabor de Mooij and the RedBeanPHP Community
Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
close ( ) : void Closes database connection.
commit ( ) : void This method is part of the RedBean Transaction Management mechanisms.
exec ( string $sql, array $bindings = [], boolean $noevent = FALSE ) : void Executes an SQL Statement using an array of values to bind If $noevent is TRUE then this function will not signal its observers to notify about the SQL execution; this to prevent infinite recursion when using observers.
get ( string $sql, array $bindings = [] ) : array Executes an SQL Query and returns a resultset.
getAffectedRows ( ) : integer Returns the number of rows that have been affected by the last update statement.
getAssoc ( string $sql, array $bindings = [] ) : array Executes the SQL query specified in $sql and takes the first two columns of the resultset. This function transforms the resultset into an associative array. Values from the the first column will serve as keys while the values of the second column will be used as values.
getAssocRow ( string $sql, array $bindings = [] ) : array Executes the SQL query specified in $sql and indexes the row by the first column.
getCell ( string $sql, array $bindings = [] ) : string Executes an SQL Query and returns a resultset.
getCol ( string $sql, array $bindings = [] ) : array Executes an SQL Query and returns a resultset.
getCursor ( string $sql, array $bindings = [] ) : redbeanphp\Cursor Returns a database agnostic Cursor object.
getDatabase ( ) : mixed Returns the original database resource. This is useful if you want to perform operations on the driver directly instead of working with the adapter. RedBean will only access the adapter and never to talk directly to the driver though.
getInsertID ( ) : integer Returns the latest insert ID.
getRow ( string $sql, array $bindings = [] ) : array Executes an SQL Query and returns a resultset.
getSQL ( ) : string Should returns a string containing the most recent SQL query that has been processed by the adapter.
rollback ( ) : void This method is part of the RedBean Transaction Management mechanisms.
startTransaction ( ) : void This method is part of the RedBean Transaction Management mechanisms.

Описание методов

close() публичный Метод

Closes database connection.
public close ( ) : void
Результат void

commit() публичный Метод

Commits the transaction.
public commit ( ) : void
Результат void

exec() публичный Метод

Executes an SQL Statement using an array of values to bind If $noevent is TRUE then this function will not signal its observers to notify about the SQL execution; this to prevent infinite recursion when using observers.
public exec ( string $sql, array $bindings = [], boolean $noevent = FALSE ) : void
$sql string string containing SQL code for database
$bindings array array of values to bind to parameters in query string
$noevent boolean no event firing
Результат void

get() публичный Метод

This method returns a multi dimensional resultset similar to getAll The values array can be used to bind values to the place holders in the SQL query.
public get ( string $sql, array $bindings = [] ) : array
$sql string string containing SQL code for database
$bindings array array of values to bind to parameters in query string
Результат array

getAffectedRows() публичный Метод

Returns the number of rows that have been affected by the last update statement.
public getAffectedRows ( ) : integer
Результат integer

getAssoc() публичный Метод

The values array can be used to bind values to the place holders in the SQL query.
public getAssoc ( string $sql, array $bindings = [] ) : array
$sql string string containing SQL code for database
$bindings array array of values to bind to parameters in query string
Результат array

getAssocRow() публичный Метод

Executes the SQL query specified in $sql and indexes the row by the first column.
public getAssocRow ( string $sql, array $bindings = [] ) : array
$sql string Sstring containing SQL code for databaseQL
$bindings array values to bind
Результат array

getCell() публичный Метод

This method returns a single cell, a scalar value as the resultset. The values array can be used to bind values to the place holders in the SQL query.
public getCell ( string $sql, array $bindings = [] ) : string
$sql string string containing SQL code for database
$bindings array array of values to bind to parameters in query string
Результат string

getCol() публичный Метод

This method returns a single column (one array) resultset. The values array can be used to bind values to the place holders in the SQL query.
public getCol ( string $sql, array $bindings = [] ) : array
$sql string string containing SQL code for database
$bindings array array of values to bind to parameters in query string
Результат array

getCursor() публичный Метод

Returns a database agnostic Cursor object.
public getCursor ( string $sql, array $bindings = [] ) : redbeanphp\Cursor
$sql string string containing SQL code for database
$bindings array array of values to bind to parameters in query string
Результат redbeanphp\Cursor

getDatabase() публичный Метод

Returns the original database resource. This is useful if you want to perform operations on the driver directly instead of working with the adapter. RedBean will only access the adapter and never to talk directly to the driver though.
public getDatabase ( ) : mixed
Результат mixed

getInsertID() публичный Метод

Returns the latest insert ID.
public getInsertID ( ) : integer
Результат integer

getRow() публичный Метод

This method returns a single row (one array) resultset. The values array can be used to bind values to the place holders in the SQL query.
public getRow ( string $sql, array $bindings = [] ) : array
$sql string string containing SQL code for database
$bindings array array of values to bind to parameters in query string
Результат array

getSQL() публичный Метод

Should returns a string containing the most recent SQL query that has been processed by the adapter.
public getSQL ( ) : string
Результат string

rollback() публичный Метод

Rolls back the transaction.
public rollback ( ) : void
Результат void

startTransaction() публичный Метод

Starts a transaction.
public startTransaction ( ) : void
Результат void