|
Doctrine 1.2.4
|
Inherits Doctrine_Query_Abstract, and Countable.
Public Member Functions | |
| __clone () | |
| __toString () | |
| addFrom ($from) | |
| addGroupBy ($groupby) | |
| addHaving ($having, $params=array()) | |
| addOrderBy ($orderby) | |
| addPendingJoinCondition ($componentAlias, $joinCondition) | |
| addSelect ($select) | |
| addSqlQueryPart ($name, $part) | |
| addSqlTableAlias ($sqlTableAlias, $componentAlias) | |
| addWhere ($where, $params=array()) | |
| adjustProcessedParam ($index) | |
| andWhere ($where, $params=array()) | |
| andWhereIn ($expr, $params=array(), $not=false) | |
| andWhereNotIn ($expr, $params=array()) | |
| buildInheritanceJoinSql ($name, $componentAlias) | |
| buildSqlQuery ($limitSubquery=true) | |
| calculateQueryCacheHash () | |
| calculateResultCacheHash ($params=array()) | |
| clearResultCache () | |
| contains ($dql) | |
| copy (Doctrine_Query $query=null) | |
| copySubqueryInfo (Doctrine_Query_Abstract $query) | |
| count ($params=array()) | |
| createSubquery () | |
| delete ($from=null) | |
| distinct ($flag=true) | |
| execute ($params=array(), $hydrationMode=null) | |
| expireQueryCache ($expire=true) | |
| expireResultCache ($expire=true) | |
| fetchArray ($params=array()) | |
| fetchOne ($params=array(), $hydrationMode=null) | |
| fixArrayParameterValues ($params=array()) | |
| forUpdate ($flag=true) | |
| free () | |
| from ($from) | |
| generateNewSqlTableAlias ($oldAlias) | |
| generateSqlTableAlias ($componentAlias, $tableName) | |
| getCachedForm ($customComponent=null) | |
| getComponentAlias ($sqlTableAlias) | |
| getConnection () | |
| getCountQueryParams ($params=array()) | |
| getCountSqlQuery () | |
| getDql () | |
| getDqlPart ($queryPart) | |
| getExpressionOwner ($expr) | |
| getFlattenedParams ($params=array()) | |
| getInheritanceCondition ($componentAlias) | |
| getInternalParams ($params=array()) | |
| getLimitSubquery () | |
| getParams () | |
| getQueryCacheDriver () | |
| getQueryCacheLifeSpan () | |
| getQueryComponent ($componentAlias) | |
| getQueryComponents () | |
| getResultCacheDriver () | |
| getResultCacheHash ($params=array()) | |
| getResultCacheLifeSpan () | |
| getRoot () | |
| getRootAlias () | |
| getRootDeclaration () | |
| getSqlAggregateAlias ($dqlAlias) | |
| getSqlParts () | |
| getSqlQuery ($params=array(), $limitSubquery=true) | |
| getSqlQuery ($params=array()) | |
| getSqlQueryPart ($part) | |
| getSqlTableAlias ($componentAlias, $tableName=null) | |
| getSqlTableAliasSeed ($sqlTableAlias) | |
| getTableAliasMap () | |
| getType () | |
| getView () | |
| groupBy ($groupby) | |
| hasAliasDeclaration ($componentAlias) | |
| hasSqlAggregateAlias ($dqlAlias) | |
| hasSqlTableAlias ($sqlTableAlias) | |
| having ($having, $params=array()) | |
| innerJoin ($join, $params=array()) | |
| isLimitSubqueryUsed () | |
| isSubquery ($bool=null) | |
| leftJoin ($join, $params=array()) | |
| limit ($limit) | |
| load ($path, $loadFields=true) | |
| loadRoot ($name, $componentAlias) | |
| offset ($offset) | |
| orderBy ($orderby) | |
| orWhere ($where, $params=array()) | |
| orWhereIn ($expr, $params=array(), $not=false) | |
| orWhereNotIn ($expr, $params=array()) | |
| parseClause ($clause) | |
| parseDqlQuery ($query, $clear=true) | |
| parseDqlQuery ($query) | |
| parseSelect ($dql) | |
| parseSelectField ($field) | |
| preQuery () | |
| processPendingAggregates () | |
| processPendingFields ($componentAlias) | |
| processPendingSubqueries () | |
| query ($query, $params=array(), $hydrationMode=null) | |
| removeDqlQueryPart ($name) | |
| removeSqlQueryPart ($name) | |
| reset () | |
| select ($select=null) | |
| set ($key, $value=null, $params=null) | |
| setConnection (Doctrine_Connection $connection) | |
| setOption ($name, $value) | |
| setParams (array $params=array()) | |
| setQueryCacheLifeSpan ($timeToLive) | |
| setResultCacheHash ($resultCacheHash) | |
| setResultCacheLifeSpan ($timeToLive) | |
| setSqlQueryPart ($name, $part) | |
| setView (Doctrine_View $view) | |
| update ($from=null) | |
| useQueryCache ($driver=true, $timeToLive=null) | |
| useResultCache ($driver=true, $timeToLive=null, $resultCacheHash=null) | |
| where ($where, $params=array()) | |
| whereIn ($expr, $params=array(), $not=false) | |
| whereNotIn ($expr, $params=array()) | |
Static Public Member Functions | |
| static | create ($conn=null, $class=null) |
Data Fields | |
| const | CREATE = 4 |
| const | DELETE = 1 |
| const | INSERT = 3 |
| const | SELECT = 0 |
| const | STATE_CLEAN = 1 |
| const | STATE_DIRECT = 3 |
| const | STATE_DIRTY = 2 |
| const | STATE_LOCKED = 4 |
| const | UPDATE = 2 |
Protected Member Functions | |
| _addDqlQueryPart ($queryPartName, $queryPart, $append=false) | |
| _buildSqlFromPart ($ignorePending=false) | |
| _buildSqlQueryBase () | |
| _constructQueryFromCache ($cached) | |
| _execute ($params) | |
| _getDqlCallback () | |
| _getDqlCallbackComponents ($params=array()) | |
| _getParser ($name) | |
| _hasDqlQueryPart ($queryPartName) | |
| _killReference ($key) | |
| _preQuery ($params=array()) | |
| _processDqlQueryPart ($queryPartName, $queryParts) | |
| _processPendingJoinConditions ($alias) | |
| _processWhereIn ($expr, $params=array(), $not=false) | |
| clear () | |
Protected Attributes | |
| $_isSubquery | |
| $_needsSubquery = false | |
| Doctrine_Query::__clone | ( | ) |
Magic method called after cloning process.
Definition at line 2186 of file Query.php.
|
inherited |
toString magic call this method is automatically called when Doctrine_Query object is trying to be used as a string So, it it converted into its DQL correspondant
Definition at line 2139 of file Abstract.php.
|
protectedinherited |
Adds a DQL part to the internal parts collection.
This method add the part specified to the array named by $queryPartName. Most part names support multiple parts addition.
| string | $queryPartName | The name of the query part. |
| string | $queryPart | The actual query part to add. |
| boolean | $append | Whether to append $queryPart to already existing parts under the same $queryPartName. Defaults to FALSE (previously added parts with the same name get overridden). |
Definition at line 2043 of file Abstract.php.
|
protected |
_buildSqlFromPart builds the from part of the query and returns it
Definition at line 1011 of file Query.php.
|
protected |
_buildSqlQueryBase returns the base of the generated sql query On mysql driver special strategy has to be used for DELETE statements (where is this special strategy??)
Definition at line 988 of file Query.php.
|
protectedinherited |
Constructs the query from the cached form.
| string | The cached query, in a serialized form. |
Definition at line 1168 of file Abstract.php.
|
protectedinherited |
_execute
| array | $params |
Definition at line 912 of file Abstract.php.
|
protectedinherited |
Get the dql call back for this query
Definition at line 1059 of file Abstract.php.
|
protectedinherited |
Returns an array of components to execute the query callbacks for
| array | $params |
Definition at line 1129 of file Abstract.php.
|
protectedinherited |
_getParser parser lazy-loader
| Doctrine_Query_Exception | if unknown parser name given |
Definition at line 2097 of file Abstract.php.
|
protectedinherited |
Checks if there's at least one DQL part defined to the internal parts collection.
| string | $queryPartName | The name of the query part. |
Definition at line 2024 of file Abstract.php.
|
protected |
Kill the reference for the passed class property. This method simply copies the value to a temporary variable and then unsets the reference and re-assigns the old value but not by reference
| string | $key |
Definition at line 2208 of file Query.php.
|
protectedinherited |
Pre query method which invokes the pre*Query() methods on the model instance or any attached record listeners
Definition at line 1094 of file Abstract.php.
|
protectedinherited |
_processDqlQueryPart parses given query part
| string | $queryPartName | the name of the query part |
| array | $queryParts | an array containing the query part data |
Definition at line 2070 of file Abstract.php.
|
protected |
Processes the pending join conditions, used for dynamically add conditions to root component/joined components without interfering in the main dql handling.
| string | $alias | Component Alias |
Definition at line 1092 of file Query.php.
|
protectedinherited |
Definition at line 1404 of file Abstract.php.
|
inherited |
addFrom adds fields to the FROM part of the query
| string | $from | Query FROM part |
Definition at line 1272 of file Abstract.php.
|
inherited |
Adds fields to the GROUP BY part of the query. $q->groupBy('u.id');
| string | $groupby | Query GROUP BY part |
Definition at line 1479 of file Abstract.php.
|
inherited |
Adds conditions to the HAVING part of the query.
This methods add HAVING clauses. These clauses are used to narrow the results by operating on aggregated values. $q->having('num_phonenumbers > ?', 1);
| string | $having | Query HAVING part |
| mixed | $params | an array of parameters or a simple scalar |
Definition at line 1497 of file Abstract.php.
|
inherited |
addOrderBy adds fields to the ORDER BY part of the query
| string | $orderby | Query ORDER BY part |
Definition at line 1514 of file Abstract.php.
| Doctrine_Query::addPendingJoinCondition | ( | $componentAlias, | |
| $joinCondition | |||
| ) |
addPendingJoinCondition
| string | $componentAlias | component alias |
| string | $joinCondition | dql join condition |
Definition at line 249 of file Query.php.
|
inherited |
Adds fields or aliased functions.
This method adds fields or dbms functions to the SELECT query part. $query->addSelect('COUNT(p.id) as num_phonenumbers');
| string | $select | Query SELECT part |
Definition at line 1246 of file Abstract.php.
|
inherited |
addSqlQueryPart adds an SQL query part to the SQL query part array
| string | $name | the name of the query part to be added |
| string | $part | query part string |
| Doctrine_Query_Exception | if trying to add unknown query part |
Definition at line 426 of file Abstract.php.
|
inherited |
addSqlTableAlias adds an SQL table alias and associates it a component alias
| string | $componentAlias | the alias for the query component associated with given tableAlias |
| string | $tableAlias | the table alias to be added |
Definition at line 1259 of file Abstract.php.
|
inherited |
Alias for
Definition at line 1281 of file Abstract.php.
| Doctrine_Query::adjustProcessedParam | ( | $index | ) |
Adjust the processed param index for "foo.bar IN ?" support
Definition at line 367 of file Query.php.
|
inherited |
Adds conditions to the WHERE part of the query. $q->andWhere('u.birthDate > ?', '1975-01-01');
| string | $where | Query WHERE part |
| mixed | $params | An array of parameters or a simple scalar |
Definition at line 1296 of file Abstract.php.
|
inherited |
Adds IN condition to the query WHERE part $q->whereIn('u.id', array(10, 23, 44));
| string | $expr | The operand of the IN |
| mixed | $params | An array of parameters or a simple scalar |
| boolean | $not | Whether or not to use NOT in front of IN. Defaults to false (simple IN clause) |
Definition at line 1360 of file Abstract.php.
|
inherited |
Adds NOT IN condition to the query WHERE part Alias for
| string | $expr | The operand of the NOT IN |
| mixed | $params | An array of parameters or a simple scalar |
Definition at line 1453 of file Abstract.php.
| Doctrine_Query::buildInheritanceJoinSql | ( | $name, | |
| $componentAlias | |||
| ) |
| string | $name | component class name |
| string | $componentAlias | alias of the component in the dql |
Definition at line 1971 of file Query.php.
| Doctrine_Query::buildSqlQuery | ( | $limitSubquery = true | ) |
Build the SQL query from the DQL
| bool | $limitSubquery | Whether or not to try and apply the limit subquery algorithm |
Definition at line 1142 of file Query.php.
|
inherited |
calculateQueryCacheHash calculate hash key for query cache
Definition at line 867 of file Abstract.php.
|
inherited |
calculateResultCacheHash calculate hash key for result cache
| array | $params |
Definition at line 881 of file Abstract.php.
|
protected |
|
inherited |
Clear the result cache entry for this query
Definition at line 1873 of file Abstract.php.
| Doctrine_Query::contains | ( | $dql | ) |
| Doctrine_Query::copy | ( | Doctrine_Query | $query = null | ) |
Copies a Doctrine_Query object.
Definition at line 2170 of file Query.php.
|
inherited |
copySubqueryInfo copy aliases from another Hydrate object
this method is needed by DQL subqueries which need the aliases of the parent query
| Doctrine_Hydrate | $query | the query object from which the aliases are copied from |
Definition at line 760 of file Abstract.php.
| Doctrine_Query::count | ( | $params = array() | ) |
Fetches the count of the query.
This method executes the main query without all the selected fields, ORDER BY part, LIMIT part and OFFSET part.
Example: Main query: SELECT u.*, p.phonenumber FROM User u LEFT JOIN u.Phonenumber p WHERE p.phonenumber = '123 123' LIMIT 10
The modified DQL query: SELECT COUNT(DISTINCT u.id) FROM User u LEFT JOIN u.Phonenumber p WHERE p.phonenumber = '123 123'
| array | $params | an array of prepared statement parameters |
Definition at line 2111 of file Query.php.
|
static |
create returns a new Doctrine_Query object
| Doctrine_Connection | $conn | optional connection parameter |
| string | $class | Query class to instantiate |
Definition at line 186 of file Query.php.
| Doctrine_Query::createSubquery | ( | ) |
createSubquery creates a subquery
Definition at line 228 of file Query.php.
|
inherited |
delete sets the query type to DELETE
Definition at line 1571 of file Abstract.php.
|
inherited |
distinct Makes the query SELECT DISTINCT. $q->distinct();
| bool | $flag | Whether or not the SELECT is DISTINCT (default true). |
Definition at line 1546 of file Abstract.php.
|
inherited |
execute executes the query and populates the data set
| array | $params |
Definition at line 990 of file Abstract.php.
|
inherited |
expireQueryCache
| boolean | $expire | whether or not to force cache expiration |
Definition at line 1920 of file Abstract.php.
|
inherited |
expireCache
| boolean | $expire | whether or not to force cache expiration |
Definition at line 1908 of file Abstract.php.
| Doctrine_Query::fetchArray | ( | $params = array() | ) |
fetchArray Convenience method to execute using array fetching as hydration mode.
| string | $params |
| Doctrine_Query::fetchOne | ( | $params = array(), |
|
$hydrationMode = null |
|||
| ) |
fetchOne Convenience method to execute the query and return the first item of the collection.
| string | $params | Query parameters |
| int | $hydrationMode | Hydration mode: see Doctrine_Core::HYDRATE_* constants |
Definition at line 279 of file Query.php.
|
inherited |
Definition at line 555 of file Abstract.php.
|
inherited |
forUpdate Makes the query SELECT FOR UPDATE.
| bool | $flag | Whether or not the SELECT is FOR UPDATE (default true). |
Definition at line 1559 of file Abstract.php.
| Doctrine_Query::free | ( | ) |
Frees the resources used by the query object. It especially breaks a cyclic reference between the query object and it's parsers. This enables PHP's current GC to reclaim the memory. This method can therefore be used to reduce memory usage when creating a lot of query objects during a request.
|
inherited |
from sets the FROM part of the query $q->from('User u');
| string | $from | Query FROM part |
Definition at line 1633 of file Abstract.php.
|
inherited |
generateNewSqlTableAlias generates a new alias from given table alias
| string | $tableAlias | table alias from which to generate the new alias from |
Definition at line 686 of file Abstract.php.
|
inherited |
generateSqlTableAlias generates a table alias from given table name and associates it with given component alias
| string | $componentAlias | the component alias to be associated with generated table alias |
| string | $tableName | the table name from which to generate the table alias |
Definition at line 822 of file Abstract.php.
|
inherited |
getCachedForm returns the cached form of this query for given resultSet
| array | $resultSet |
Definition at line 1208 of file Abstract.php.
|
inherited |
getComponentAlias get component alias associated with given table alias
| string | $sqlTableAlias | the SQL table alias that identifies the component alias |
Definition at line 852 of file Abstract.php.
|
inherited |
getConnection
Definition at line 2013 of file Abstract.php.
|
inherited |
getCountQueryParams Retrieves the parameters for count query
Definition at line 537 of file Abstract.php.
| Doctrine_Query::getCountSqlQuery | ( | ) |
Get count sql query for this Doctrine_Query instance.
This method is used in Doctrine_Query::count() for returning an integer for the number of records which will be returned when executed.
Definition at line 2020 of file Query.php.
|
inherited |
getDql returns the DQL query that is represented by this query object.
the query is built from $_dqlParts
Definition at line 348 of file Abstract.php.
| Doctrine_Query::getDqlPart | ( | $queryPart | ) |
Retrieves a specific DQL query part.
var_dump($q->getDqlPart('where')); // array(2) { [0] => string(8) 'name = ?' [1] => string(8) 'date > ?' } | string | $queryPart | the name of the query part; can be: array from, containing strings; array select, containg string; boolean forUpdate; array set; array join; array where; array groupby; array having; array orderby, containing strings such as 'id ASC'; array limit, containing numerics; array offset, containing numerics; |
Definition at line 405 of file Query.php.
| Doctrine_Query::getExpressionOwner | ( | $expr | ) |
getExpressionOwner returns the component alias for owner of given expression
| string | $expr | expression from which to get to owner from |
Definition at line 570 of file Query.php.
|
inherited |
Get flattened array of parameters for query. Used internally and used to pass flat array of params to the database.
| array | $params |
Definition at line 502 of file Abstract.php.
|
inherited |
Returns the inheritance condition for the passed componentAlias If no component alias is specified it defaults to the root component
This function is used to append a SQL condition to models which have inheritance mapping The condition is applied to the FROM component in the WHERE, but the condition is applied to JOINS in the ON condition and not the WHERE
Definition at line 618 of file Abstract.php.
|
inherited |
getInternalParams
Definition at line 516 of file Abstract.php.
| Doctrine_Query::getLimitSubquery | ( | ) |
getLimitSubquery this is method is used by the record limit algorithm
when fetching one-to-many, many-to-many associated data with LIMIT clause an additional subquery is needed for limiting the number of returned records instead of limiting the number of sql result set rows
Definition at line 1379 of file Query.php.
|
inherited |
Get raw array of parameters for query and all parts.
Definition at line 490 of file Abstract.php.
|
inherited |
getQueryCacheDriver returns the cache driver used for caching queries
Definition at line 1999 of file Abstract.php.
|
inherited |
Gets the life span of the query cache the Query object is using.
Definition at line 1973 of file Abstract.php.
|
inherited |
getQueryComponent get the declaration for given component alias
| string | $componentAlias | the component alias the retrieve the declaration from |
Definition at line 740 of file Abstract.php.
|
inherited |
Gets the components of this query.
Definition at line 1798 of file Abstract.php.
|
inherited |
getResultCacheDriver returns the cache driver used for caching result sets
Definition at line 1984 of file Abstract.php.
|
inherited |
Get the result cache hash/key. Returns key set with useResultCache() or generates a unique key from the query automatically.
| array | $params |
Definition at line 897 of file Abstract.php.
|
inherited |
Gets the life span of the result cache in seconds.
Definition at line 1947 of file Abstract.php.
|
inherited |
getRoot returns the root component for this object
Definition at line 802 of file Abstract.php.
|
inherited |
getRootAlias returns the alias of the root component
Definition at line 775 of file Abstract.php.
|
inherited |
getRootDeclaration returns the root declaration
Definition at line 790 of file Abstract.php.
| Doctrine_Query::getSqlAggregateAlias | ( | $dqlAlias | ) |
getSqlAggregateAlias
| string | $dqlAlias | the dql alias of an aggregate value |
Definition at line 329 of file Query.php.
|
inherited |
Return the SQL parts.
Definition at line 1808 of file Abstract.php.
| Doctrine_Query::getSqlQuery | ( | $params = array(), |
|
$limitSubquery = true |
|||
| ) |
builds the sql query from the given parameters and applies things such as column aggregation inheritance and limit subqueries if needed
| array | $params | an array of prepared statement params (needed only in mysql driver when limit subquery algorithm is used) |
| bool | $limitSubquery | Whether or not to try and apply the limit subquery algorithm |
Definition at line 1119 of file Query.php.
|
abstractinherited |
Gets the SQL query that corresponds to this query object. The returned SQL syntax depends on the connection driver that is used by this query object at the time of this method call.
| array | $params |
|
inherited |
getSqlQueryPart gets an SQL query part from the SQL query part array
| string | $name | the name of the query part to be set |
| string | $part | query part string |
| Doctrine_Query_Exception | if trying to set unknown query part |
Definition at line 381 of file Abstract.php.
|
inherited |
getSqlTableAlias some database such as Oracle need the identifier lengths to be < ~30 chars hence Doctrine creates as short identifier aliases as possible
this method is used for the creation of short table aliases, its also smart enough to check if an alias already exists for given component (componentAlias)
| string | $componentAlias | the alias for the query component to search table alias for |
| string | $tableName | the table name from which the table alias is being created |
Definition at line 664 of file Abstract.php.
|
inherited |
getSqlTableAliasSeed returns the alias seed for given table alias
| string | $tableAlias | table alias that identifies the alias seed |
Definition at line 713 of file Abstract.php.
|
inherited |
getTableAliasMap returns all table aliases
Definition at line 335 of file Abstract.php.
|
inherited |
getType
returns the type of this query object by default the type is Doctrine_Query_Abstract::SELECT but if update() or delete() are being called the type is Doctrine_Query_Abstract::UPDATE and Doctrine_Query_Abstract::DELETE, respectively
Definition at line 1827 of file Abstract.php.
|
inherited |
getView returns the view associated with this query object (if any)
Definition at line 593 of file Abstract.php.
|
inherited |
groupBy sets the GROUP BY part of the query
| string | $groupby | Query GROUP BY part |
Definition at line 1681 of file Abstract.php.
|
inherited |
hasAliasDeclaration whether or not this object has a declaration for given component alias
| string | $componentAlias | the component alias the retrieve the declaration from |
Definition at line 728 of file Abstract.php.
| Doctrine_Query::hasSqlAggregateAlias | ( | $dqlAlias | ) |
Check if a dql alias has a sql aggregate alias
| string | $dqlAlias |
Definition at line 353 of file Query.php.
|
inherited |
hasSqlTableAlias whether or not this object has given tableAlias
| string | $tableAlias | the table alias to be checked |
Definition at line 324 of file Abstract.php.
|
inherited |
having sets the HAVING part of the query
| string | $having | Query HAVING part |
| mixed | $params | an array of parameters or a simple scalar |
Definition at line 1715 of file Abstract.php.
|
inherited |
innerJoin appends an INNER JOIN to the FROM part of the query
| string | $join | Query INNER JOIN |
Definition at line 1645 of file Abstract.php.
|
inherited |
limitSubqueryUsed
Definition at line 603 of file Abstract.php.
| Doctrine_Query::isSubquery | ( | $bool = null | ) |
isSubquery if $bool parameter is set this method sets the value of Doctrine_Query::$isSubquery. If this value is set to true the query object will not load the primary key fields of the selected components.
If null is given as the first parameter this method retrieves the current value of Doctrine_Query::$isSubquery.
| boolean | $bool | whether or not this query acts as a subquery |
Definition at line 313 of file Query.php.
|
inherited |
leftJoin appends a LEFT JOIN to the FROM part of the query
| string | $join | Query LEFT JOIN |
Definition at line 1663 of file Abstract.php.
|
inherited |
limit sets the Query query limit
| integer | $limit | limit to be used for limiting the query results |
Definition at line 1749 of file Abstract.php.
| Doctrine_Query::load | ( | $path, | |
$loadFields = true |
|||
| ) |
| string | $path | component alias |
| boolean | $loadFields |
Definition at line 1664 of file Query.php.
| Doctrine_Query::loadRoot | ( | $name, | |
| $componentAlias | |||
| ) |
loadRoot
| string | $name | |
| string | $componentAlias |
DESCRIBE ME!
this method is called only in Doctrine_Query class. Shouldn't be private or protected?
Definition at line 1934 of file Query.php.
|
inherited |
offset sets the Query query offset
| integer | $offset | offset to be used for paginating the query |
Definition at line 1761 of file Abstract.php.
|
inherited |
Sets the ORDER BY part of the query. $q->orderBy('u.name'); $query->orderBy('u.birthDate DESC');
| string | $orderby | Query ORDER BY part |
Definition at line 1737 of file Abstract.php.
|
inherited |
Adds conditions to the WHERE part of the query $q->orWhere('u.role = ?', 'admin');
| string | $where | Query WHERE part |
| mixed | $params | An array of parameters or a simple scalar |
Definition at line 1321 of file Abstract.php.
|
inherited |
Adds IN condition to the query WHERE part, appending it with an OR operator. $q->orWhereIn('u.id', array(10, 23)) ->orWhereIn('u.id', 44); // will select all record with id equal to 10, 23 or 44
| string | $expr | The operand of the IN |
| mixed | $params | An array of parameters or a simple scalar |
| boolean | $not | Whether or not to use NOT in front of IN |
Definition at line 1387 of file Abstract.php.
|
inherited |
Adds NOT IN condition to the query WHERE part
| string | $expr | The operand of the NOT IN |
| mixed | $params | An array of parameters or a simple scalar |
Definition at line 1465 of file Abstract.php.
| Doctrine_Query::parseClause | ( | $clause | ) |
parseClause parses given DQL clause
this method handles five tasks:
Definition at line 687 of file Query.php.
| Doctrine_Query::parseDqlQuery | ( | $query, | |
$clear = true |
|||
| ) |
DQL PARSER parses a DQL query first splits the query in parts and then uses individual parsers for each part
| string | $query | DQL query |
| boolean | $clear | whether or not to clear the aliases |
| Doctrine_Query_Exception | if some generic parsing error occurs |
Definition at line 1606 of file Query.php.
|
abstractinherited |
parseDqlQuery parses a dql query
| string | $query | query to be parsed |
| Doctrine_Query::parseSelect | ( | $dql | ) |
parseSelect parses the query select part and adds selected fields to pendingFields array
| string | $dql |
Definition at line 595 of file Query.php.
| Doctrine_Query::parseSelectField | ( | $field | ) |
Parses a nested field $q->parseSelectField('u.Phonenumber.value');
| string | $field |
| Doctrine_Query_Exception | if unknown component alias has been given |
Definition at line 524 of file Query.php.
|
inherited |
Blank hook methods which can be implemented in Doctrine_Query child classes
Definition at line 1156 of file Abstract.php.
| Doctrine_Query::processPendingAggregates | ( | ) |
processPendingAggregates processes pending aggregate values for given component alias
Definition at line 913 of file Query.php.
| Doctrine_Query::processPendingFields | ( | $componentAlias | ) |
processPendingFields the fields in SELECT clause cannot be parsed until the components in FROM clause are parsed, hence this method is called everytime a specific component is being parsed. For instance, the wildcard '*' is expanded in the list of columns.
| Doctrine_Query_Exception | if unknown component alias has been given |
| string | $componentAlias | the alias of the component |
Definition at line 440 of file Query.php.
| Doctrine_Query::processPendingSubqueries | ( | ) |
processPendingSubqueries processes pending subqueries
subqueries can only be processed when the query is fully constructed since some subqueries may be correlated
Definition at line 882 of file Query.php.
| string $_sql cached SQL Doctrine_Query::query | ( | $query, | |
$params = array(), |
|||
$hydrationMode = null |
|||
| ) |
Queries the database with DQL (Doctrine Query Language).
This methods parses a Dql query and builds the query parts.
| string | $query | Dql query |
| array | $params | prepared statement parameters |
| int | $hydrationMode | Doctrine_Core::HYDRATE_ARRAY or Doctrine_Core::HYDRATE_RECORD |
|
inherited |
removeDqlQueryPart removes a dql query part from the dql query part array
| string | $name | the name of the query part to be removed |
| Doctrine_Query_Exception | if trying to remove unknown query part |
Definition at line 470 of file Abstract.php.
|
inherited |
removeSqlQueryPart removes a query part from the query part array
| string | $name | the name of the query part to be removed |
| Doctrine_Query_Exception | if trying to remove unknown query part |
Definition at line 447 of file Abstract.php.
| Doctrine_Query::reset | ( | ) |
Resets the query to the state just after it has been instantiated.
Definition at line 208 of file Query.php.
|
inherited |
select sets the SELECT part of the query
| string | $select | Query SELECT part |
Definition at line 1526 of file Abstract.php.
|
inherited |
set sets the SET part of the query
| string | $update | Query UPDATE part |
Definition at line 1603 of file Abstract.php.
|
inherited |
Set the connection this query object should use
| Doctrine_Connection | $connection |
Definition at line 296 of file Abstract.php.
|
inherited |
setOption
| string | $name | option name |
| string | $value | option value |
Definition at line 309 of file Abstract.php.
|
inherited |
setParams
| array | $params |
Definition at line 526 of file Abstract.php.
|
inherited |
setQueryCacheLifeSpan
| integer | $timeToLive | how long the cache entry is valid |
Definition at line 1958 of file Abstract.php.
|
inherited |
Set the result cache hash to be used for storing the results in the cache driver
| string | $resultCacheHash |
Definition at line 1861 of file Abstract.php.
|
inherited |
setResultCacheLifeSpan
| integer | $timeToLive | how long the cache entry is valid (in seconds) |
Definition at line 1932 of file Abstract.php.
|
inherited |
setSqlQueryPart sets an SQL query part in the SQL query part array
| string | $name | the name of the query part to be set |
| string | $part | query part string |
| Doctrine_Query_Exception | if trying to set unknown query part |
Definition at line 398 of file Abstract.php.
|
inherited |
setView sets a database view this query object uses this method should only be called internally by doctrine
| Doctrine_View | $view | database view |
Definition at line 582 of file Abstract.php.
|
inherited |
update sets the UPDATE part of the query
| string | $update | Query UPDATE part |
Definition at line 1587 of file Abstract.php.
|
inherited |
useQueryCache
| Doctrine_Cache_Interface | bool | $driver | cache driver |
| integer | $timeToLive | how long the cache entry is valid |
Definition at line 1888 of file Abstract.php.
|
inherited |
useResultCache
| Doctrine_Cache_Interface | bool | $driver | cache driver |
| integer | $timeToLive | how long the cache entry is valid |
| string | $resultCacheHash | The key to use for storing the queries result cache entry |
Definition at line 1840 of file Abstract.php.
|
inherited |
where sets the WHERE part of the query
| string | $join | Query WHERE part |
| mixed | $params | an array of parameters or a simple scalar |
Definition at line 1694 of file Abstract.php.
|
inherited |
Adds IN condition to the query WHERE part. Alias to
| string | $expr | the operand of the IN |
| mixed | $params | an array of parameters or a simple scalar |
| boolean | $not | whether or not to use NOT in front of IN |
Definition at line 1344 of file Abstract.php.
|
inherited |
Adds NOT IN condition to the query WHERE part. $q->whereNotIn('u.id', array(10, 20)); // will exclude users with id 10 and 20 from the select
| string | $expr | the operand of the NOT IN |
| mixed | $params | an array of parameters or a simple scalar |
Definition at line 1440 of file Abstract.php.
|
protected |
|
protected |
|
inherited |
constant for CREATE queries
Definition at line 63 of file Abstract.php.
|
inherited |
constant for DELETE queries
Definition at line 48 of file Abstract.php.
|
inherited |
constant for INSERT queries
Definition at line 58 of file Abstract.php.
|
inherited |
QUERY TYPE CONSTANTS constant for SELECT queries
Definition at line 43 of file Abstract.php.
|
inherited |
A query object is in CLEAN state when it has NO unparsed/unprocessed DQL parts.
Definition at line 69 of file Abstract.php.
|
inherited |
A query is in DIRECT state when ... ?
Definition at line 80 of file Abstract.php.
|
inherited |
A query object is in state DIRTY when it has DQL parts that have not yet been parsed/processed.
Definition at line 75 of file Abstract.php.
|
inherited |
A query object is on LOCKED state when ... ?
Definition at line 85 of file Abstract.php.
|
inherited |
constant for UPDATE queries
Definition at line 53 of file Abstract.php.