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
파일 보기 프로젝트 열기: gabordemooij/redbean 0 사용 예제들

공개 메소드들

메소드 설명
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