xPDOCriteriaEncapsulates a SQL query into a PDOStatement with a set of bindings.
Constants
Located in /xpdo.class.php (line 2227)
| Class | Description |
|---|---|
xPDOQuery
|
An xPDOCriteria derivative with methods for constructing complex statements. |
xPDOCriteria
__construct
(xPDO &$xpdo, [string $sql = ''], [array $bindings = array ()], [boolean|integer $cacheFlag = false])
void
bind
([array $bindings = array ()], [boolean $byValue = true], [boolean|integer $cacheFlag = false])
PDOStatement
prepare
([array $bindings = array ()], [boolean $byValue = true], [boolean|integer $cacheFlag = null])
Constructor __construct (line 2252)
The constructor for a new xPDOCriteria instance.
Constants
The constructor optionally prepares provided SQL and/or parameter bindings. Setting the bindings via the constructor or with the xPDOCriteria::bind() function allows you to make use of the data object caching layer.
The statement will not be prepared immediately if the cacheFlag value is true or a positive integer, in order to allow the result to be found in the cache before being queried from an actual database connection.
bind (line 2287)
Binds an array of key/value pairs to the xPDOCriteria prepared statement.
Constants
Use this method to bind parameters in a way that makes it possible to cache results of previous executions of the criteria or compare the criteria to other individual or collections of criteria.
equals (line 2321)
Compares to see if two xPDOCriteria instances are the same.
Constants
prepare (line 2350)
Prepares the sql and bindings of this instance into a PDOStatement.
Constants
The xPDOCriteria::$sql attribute must be set in order to prepare the statement. You can also pass bindings directly to this function and they will be run through xPDOCriteria::bind() if the statement is successfully prepared.
If the xPDOCriteria::$stmt already exists, it is simply returned.
toSQL (line 2366)
Converts the current xPDOQuery to parsed SQL.
Constants
Documentation generated on Mon, 27 Dec 2010 11:08:26 -0700 by phpDocumentor 1.4.3