phpPeanuts  2.2.0
phpPeanuts framework
 All Data Structures Namespaces Files Functions Variables
Public Member Functions | Static Public Member Functions | Data Fields
PntPdoDao Class Reference

Inherits PntDao.

Inherited by QueryHandler.

Public Member Functions

 __construct ($connection=null)
 
 getDbmsName ()
 
 supportsSelectRowCount ()
 
 _runQuery ($error="Query error")
 
 getFieldNames ()
 
 getInsertId ($sequenceName=null)
 
 dataSeek ($index)
 
 getSingleValue ($query='', $error="Query error")
 
 quote ($value)
 
 getAssocRows ($max=null)
 
 getAssocRow ()
 
 release ()
 
 connect ()
 
 beginTransaction ()
 
 commit ()
 
 rollBack ()
 
- Public Member Functions inherited from PntDao
 __construct ($connection=null)
 
 getDbmsName ()
 
 supportsSelectRowCount ()
 
 runQuery ($query='', $error="Query error")
 
 _runQuery ($error="Query error")
 
 getFieldNames ()
 
 getRowCount ()
 
 getColumnCount ()
 
 getError ()
 
 getErrNo ()
 
 dataSeek ($index)
 
 getSingleValue ($query='', $error="Query error")
 
 getInsertId ()
 
 prefixColumnNames ($colNames, $prefix)
 
 select_from ($columnNames, $tableName, $distinct=false)
 
 where_equals ($columnName, $value, $placeholder='?')
 
 limit ($rowCount, $offset=0)
 
 joinAllById ($tableMap, $baseTable)
 
 in ($columnName, $values)
 
 convertToSql ($value)
 
 convertConditionArgumentToSql ($value)
 
 quote ($string)
 
 setQueryToInsertObject_table_fieldMap ($anObject, $tableName, $fieldMap)
 
 setQueryToSaveObject_table_fieldMap ($anObject, $tableName, $fieldMap, $insert)
 
 setQueryToDeleteFrom_where_equals ($tableName, $columnName, $value)
 
 addSqlFromSpec ($spec, $groupBy=false)
 
 getAssocRows ($max=null)
 
 getAssocRow ()
 
 release ()
 
 getConnection ()
 
 setConnection ($value)
 
 setDefaultConnection ()
 
 connect ()
 
 beginTransaction ()
 
 commit ()
 
 rollBack ()
 
 param ($value, $placeholder='?')
 
 clearParams ()
 
 replacePlaceholders ()
 
 addFieldPropsTo_table ($obj, $tableName, $includeList=null)
 
 addFieldPropTo_row ($obj, $row)
 
 getPropertyType ($mySqlType)
 

Static Public Member Functions

static getParamType ($prop)
 

Data Fields

 $parameters
 
 $statement
 
 $preparedQuery
 
- Data Fields inherited from PntDao
 $connection
 
 $query = ''
 
 $rowCount =0
 
 $columnCount =0
 
 $result
 
 $insertId
 
 $error
 
 $errNo = 0
 
 $parameters
 
 $rowIndex
 
 $dbSource
 

Constructor & Destructor Documentation

__construct (   $connection = null)

Member Function Documentation

_runQuery (   $error = "Query error")
beginTransaction ( )
commit ( )
connect ( )

Connects to the DBMS and selects the database Stores the resulting resource on $this->connection PRECONDITION: $this->connection must be a valid DatabaseConnection instance

dataSeek (   $index)

Not supported

getAssocRow ( )

Gets next row as associative array, or false if none

getAssocRows (   $max = null)

Gets rows starting at current rerord position

Parameters
number$maxThe maximum number of rows to get. If null all remaining rows are returned. Returns an array of associative row arrays (indexed[rowIndex][rowName])
getDbmsName ( )
getFieldNames ( )
getInsertId (   $sequenceName = null)

Return the id of the new record after an insert, or the last value from a sequence object, depending on the underlying driver

Parameters
String$sequenceNamename of sequence
static getParamType (   $prop)
static
getSingleValue (   $query = '',
  $error = "Query error" 
)

Ececutes the query and returns the value of the first column of the first row or null if no row. !does no longer reset the record pointer

quote (   $value)

Return the $value quoted and with special characters escaped Not all PDO drivers implement this method (notably PDO_ODBC). For those drivers subclasses will have to be used overriding this method

release ( )
rollBack ( )
supportsSelectRowCount ( )
Returns
boolean wheather this does support rowcount with SELECT For some drivers/dsbs this may actually depend on the cursor type used. If this function returns true, dataSeek should be supported too

Field Documentation

$parameters

Holds parameter values that have been collected through calls to ::convertToSql and ::convertConditionArgumentToSql

$preparedQuery
$statement

PDOStatement Prepared statement


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