spoof
 All Data Structures Namespaces Files Functions Variables Pages
PDO Class Reference
Inheritance diagram for PDO:
Collaboration diagram for PDO:

Public Member Functions

 select (\lib360\db\connection\IConnection $db, $query, array $values=NULL, $name=NULL)
 update (\lib360\db\connection\IConnection $db, $query, array $values=NULL)
 insert (\lib360\db\connection\IConnection $db, $query, array $values=NULL)
 delete (\lib360\db\connection\IConnection $db, $query, array $values=NULL)
 query (\lib360\db\connection\IConnection $db, $query, array $values=NULL)
 bindValues (\PDOStatement $sth, array $values=NULL)

Static Public Attributes

static $typeMap

Detailed Description

PDO executor implementation


Member Function Documentation

bindValues ( \PDOStatement  $sth,
array  $values = NULL 
)

Binds values to PDOStatement.

Parameters:
\PDOStatement$sthPDO statement object to which values will be bound
array$valuesoptional array of values ( or primitive types) for prepared statement

Here is the caller graph for this function:

delete ( \lib360\db\connection\IConnection  $db,
  $query,
array  $values = NULL 
)

Executes database delete.

Parameters:
\lib360\db\connection\IConnection$dbdatabase connection object
string$queryprepared query statement
array$valuesoptional array of values for prepared statement
Returns:
integer number of rows deleted
Exceptions:
PreparedQueryExceptionwhen database error occurs during query execution

Implements IExecutor.

Here is the call graph for this function:

insert ( \lib360\db\connection\IConnection  $db,
  $query,
array  $values = NULL 
)

Executes database insert.

Parameters:
\lib360\db\connection\IConnection$dbobject
string$queryprepared query statement
array$valuesoptional array of values for prepared statement
Returns:
integer number of rows inserted
Exceptions:
PreparedQueryExceptionwhen database error occurs during query execution

Implements IExecutor.

Here is the call graph for this function:

query ( \lib360\db\connection\IConnection  $db,
  $query,
array  $values = NULL 
)

Executes a generic database query.

Parameters:
\lib360\db\connection\IConnection$dbdatabase connection object
string$queryprepared query statement
array$valuesoptional array of values for prepared statement
Exceptions:
PreparedQueryExceptionwhen database error occurs during query execution

Implements IExecutor.

Here is the call graph for this function:

select ( \lib360\db\connection\IConnection  $db,
  $query,
array  $values = NULL,
  $name = NULL 
)

Executes database select.

Parameters:
\lib360\db\connection\IConnection$dbdatabase connection object
string$queryprepared query statement
array$valuesoptional array of values for prepared statement
string$nameoptional name to use for identifying records
Returns:
object
Exceptions:
\lib360\db\executor\PreparedQueryExceptionwhen database error occurs during query execution

Implements IExecutor.

Here is the call graph for this function:

update ( \lib360\db\connection\IConnection  $db,
  $query,
array  $values = NULL 
)

Executes database update.

Parameters:
\lib360\db\connection\IConnection$dbdatabase connection object
string$queryprepared query statement
array$valuesoptional array of values for prepared statement
Returns:
integer number of rows updated
Exceptions:
PreparedQueryExceptionwhen database error occurs during query execution

Implements IExecutor.

Here is the call graph for this function:


Field Documentation

$typeMap
static
Initial value:
array(
\lib360\db\value\Value::TYPE_BOOLEAN => \PDO::PARAM_BOOL,
\lib360\db\value\Value::TYPE_NULL => \PDO::PARAM_NULL,
\lib360\db\value\Value::TYPE_STRING => \PDO::PARAM_STR,
\lib360\db\value\Value::TYPE_INTEGER => \PDO::PARAM_INT,
\lib360\db\value\Value::TYPE_FLOAT => \PDO::PARAM_STR,
\lib360\db\value\Value::TYPE_BINARY => \PDO::PARAM_LOB
)

Maps types to PDO parameter types


The documentation for this class was generated from the following file: