getSQL()
getSQL() : string
Should returns a string containing the most recent SQL query that has been processed by the adapter.
Adapter Interface.
Describes the API for a RedBeanPHP Database Adapter. This interface defines the API contract for a RedBeanPHP Database Adapter.
exec(string $sql, array $bindings = array(), boolean $noevent = FALSE) : integer
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.
string | $sql | string containing SQL code for database |
array | $bindings | array of values to bind to parameters in query string |
boolean | $noevent | no event firing |
get(string $sql, array $bindings = array()) : array
Executes an SQL Query and returns a resultset.
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.
string | $sql | string containing SQL code for database |
array | $bindings | array of values to bind to parameters in query string |
getRow(string $sql, array $bindings = array()) : array|NULL
Executes an SQL Query and returns a resultset.
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.
string | $sql | string containing SQL code for database |
array | $bindings | array of values to bind to parameters in query string |
getCol(string $sql, array $bindings = array()) : array
Executes an SQL Query and returns a resultset.
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.
string | $sql | string containing SQL code for database |
array | $bindings | array of values to bind to parameters in query string |
getCell(string $sql, array $bindings = array()) : string|NULL
Executes an SQL Query and returns a resultset.
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.
string | $sql | string containing SQL code for database |
array | $bindings | array of values to bind to parameters in query string |
getCursor(string $sql, array $bindings = array()) : \RedBeanPHP\Cursor
Returns a database agnostic Cursor object.
string | $sql | string containing SQL code for database |
array | $bindings | array of values to bind to parameters in query string |
getDatabase() : \RedBeanPHP\Driver
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.
setOption(string $optionKey, string $optionValue) : boolean
Sets a driver specific option.
Using this method you can access driver-specific functions. If the selected option exists the value will be passed and this method will return boolean TRUE, otherwise it will return boolean FALSE.
string | $optionKey | option key |
string | $optionValue | option value |