Overview

Namespaces

  • None
  • RedBeanPHP
    • Adapter
    • BeanHelper
    • Cursor
    • Driver
    • Logger
      • RDefault
    • QueryWriter
    • RedException
    • Repository
    • Util

Classes

  • AssociationManager
  • BeanCollection
  • DuplicationManager
  • Facade
  • Finder
  • Jsonable
  • LabelMaker
  • Observable
  • OODB
  • OODBBean
  • R
  • Repository
  • SimpleModel
  • SimpleModelHelper
  • TagManager
  • ToolBox

Interfaces

  • Adapter
  • BeanHelper
  • Cursor
  • Driver
  • Logger
  • Observer
  • Plugin
  • QueryWriter

Exceptions

  • RedException
  • Overview
  • Namespace
  • Class

Interface Adapter

Adapter Interface. Describes the API for a RedBeanPHP Database Adapter. This interface defines the API contract for a RedBeanPHP Database Adapter.

Direct known implementers

RedBeanPHP\Adapter\DBAdapter
Namespace: RedBeanPHP
Copyright:

(c) G.J.G.T. (Gabor) de Mooij and the RedBeanPHP Community. This source file is subject to the BSD/GPLv2 License that is bundled with this source code in the file license.txt.


License: BSD/GPLv2
Author: Gabor de Mooij and the RedBeanPHP Community
File: RedBeanPHP/Adapter.php
Located at Adapter.php
Methods summary
public string
# getSQL( )

Returns the latest SQL statement.

Returns the latest SQL statement.

Returns

string
public
# exec( string $sql, array $bindings = array(), boolean $noevent = FALSE )

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.

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.

Parameters

$sql
string containing SQL code for database
$bindings
array of values to bind to parameters in query string
$noevent
no event firing
public array
# get( string $sql, array $bindings = 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.

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.

Parameters

$sql
string containing SQL code for database
$bindings
array of values to bind to parameters in query string

Returns

array
public array
# getRow( string $sql, array $bindings = array() )

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.

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.

Parameters

$sql
string containing SQL code for database
$bindings
array of values to bind to parameters in query string

Returns

array
public array
# getCol( string $sql, array $bindings = 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.

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.

Parameters

$sql
string containing SQL code for database
$bindings
array of values to bind to parameters in query string

Returns

array
public string
# getCell( string $sql, array $bindings = array() )

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.

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.

Parameters

$sql
string containing SQL code for database
$bindings
array of values to bind to parameters in query string

Returns

string
public array
# 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. The values array can be used to bind values to the place holders in the SQL query.

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. The values array can be used to bind values to the place holders in the SQL query.

Parameters

$sql
string containing SQL code for database
$bindings
array of values to bind to parameters in query string

Returns

array
public array
# getAssocRow( string $sql, array $bindings = array() )

Executes the SQL query specified in $sql and indexes the row by the first column.

Executes the SQL query specified in $sql and indexes the row by the first column.

Parameters

$sql
Sstring containing SQL code for databaseQL
$bindings
values to bind

Returns

array
public integer
# getInsertID( )

Returns the latest insert ID.

Returns the latest insert ID.

Returns

integer
public integer
# getAffectedRows( )

Returns the number of rows that have been affected by the last update statement.

Returns the number of rows that have been affected by the last update statement.

Returns

integer
public RedBeanPHP\Cursor
# getCursor( string $sql, array $bindings = array() )

Returns a database agnostic Cursor object.

Returns a database agnostic Cursor object.

Parameters

$sql
string containing SQL code for database
$bindings
array of values to bind to parameters in query string

Returns

RedBeanPHP\Cursor
public mixed
# 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.

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.

Returns

mixed
public
# startTransaction( )

This method is part of the RedBean Transaction Management mechanisms. Starts a transaction.

This method is part of the RedBean Transaction Management mechanisms. Starts a transaction.

public
# commit( )

This method is part of the RedBean Transaction Management mechanisms. Commits the transaction.

This method is part of the RedBean Transaction Management mechanisms. Commits the transaction.

public
# rollback( )

This method is part of the RedBean Transaction Management mechanisms. Rolls back the transaction.

This method is part of the RedBean Transaction Management mechanisms. Rolls back the transaction.

public
# close( )

Closes database connection.

Closes database connection.

API documentation generated by ApiGen