Свойство | Type | Description | |
---|---|---|---|
$conjunction | string | ||
$distinct | boolean | ||
$fields | array | ||
$limit | integer | ||
$limitOffset | integer | ||
$mapper | Horde_Rdo_Mapper | ||
$relationships | array | ||
$tests | array |
Свойство | Type | Description | |
---|---|---|---|
$_aliasCount | integer | ||
$_aliases | array | ||
$_sortby | array |
Méthode | Description | |
---|---|---|
__construct ( Horde_Rdo_Mapper $mapper = null ) | Constructor. | |
__get ( string $key ) | Accessor for any fields that we want some logic around. | |
addFields ( array $fields, string $fieldPrefix = null ) : Horde_Rdo_Query | Adds fields to return with the query. | |
addRelationship ( string $relationship, array $args ) : Horde_Rdo_Query | Adds a relationship type to a query. | |
addTest ( $field, $test, $value ) | ||
clearSort ( ) | ||
combineWith ( string $conjunction ) | ||
create ( mixed $query, Horde_Rdo_Mapper $mapper = null ) : Horde_Rdo_Query | Turn any of the acceptable query shorthands into a full Horde_Rdo_Query object. If you pass an existing Horde_Rdo_Query object in, it will be cloned before it's returned so that it can be safely modified. | |
distinct ( boolean $distinct ) : Horde_Rdo_Query | Makes the query return only distinct (different) values. | |
getQuery ( ) : array | Query generator. | |
limit ( integer $limit, integer $offset = null ) | Restrict the query to a subset of the results. | |
setFields ( array $fields, string $fieldPrefix = null ) : Horde_Rdo_Query | Sets the fields to return with the query. | |
setMapper ( Horde_Rdo_Mapper $mapper ) : Horde_Rdo_Query | ||
sortBy ( string $sort ) | Add a sorting rule. |
Méthode | Description | |
---|---|---|
_alias ( $tableName ) | Get a unique table alias | |
_fillJoinPlaceholders ( Horde_Rdo_Mapper $m1, Horde_Rdo_Mapper $m2, array $query ) : array | Take a query array and replace @field@ placeholders with values that will match in the load query. | |
_from ( &$sql, &$bindParams ) | ||
_join ( &$sql, &$bindParams ) | ||
_limit ( &$sql, &$bindParams ) | ||
_orderBy ( &$sql, &$bindParams ) | ||
_prefix ( &$fieldName, $key, $prefix ) | Callback for array_walk to prefix all elements of an array with a given prefix. | |
_select ( &$sql, &$bindParams ) | ||
_where ( &$sql, &$bindParams ) |
public __construct ( Horde_Rdo_Mapper $mapper = null ) | ||
$mapper | Horde_Rdo_Mapper | Rdo mapper base class |
protected _fillJoinPlaceholders ( Horde_Rdo_Mapper $m1, Horde_Rdo_Mapper $m2, array $query ) : array | ||
$m1 | Horde_Rdo_Mapper | Left-hand mapper |
$m2 | Horde_Rdo_Mapper | Right-hand mapper |
$query | array | The query to process placeholders on. |
Résultat | array | The query with placeholders filled in. |
protected _prefix ( &$fieldName, $key, $prefix ) |
public addRelationship ( string $relationship, array $args ) : Horde_Rdo_Query | ||
$relationship | string | The name of the relationship as defined in the mapper. |
$args | array | The parameter array as defined in the mapper: - mapper: The mapper object of the result class. - table: Optional name of the table to use. - tableAlias: Optional alias name for the base table. - join_type: Optional explicitly control the type of join. - type: The type of relation, any of the constants in Horde_Rdo. |
Résultat | Horde_Rdo_Query | This object. |
public combineWith ( string $conjunction ) | ||
$conjunction | string | SQL conjunction such as "AND", "OR". |
public setMapper ( Horde_Rdo_Mapper $mapper ) : Horde_Rdo_Query | ||
$mapper | Horde_Rdo_Mapper | Rdo mapper base class |
Résultat | Horde_Rdo_Query | Return the query object for fluent chaining. |