# OqlSelectParser Class Reference
[Object Query Language based on Criteria]

Parses OQL select query. More...

Inheritance diagram for OqlSelectParser:
[legend]

List of all members.

## Static Public Member Functions

static | create ()

## Public Attributes

const | PROPERTY_STATE = 1
const | FROM_STATE = 2
const | WHERE_STATE = 3
const | GROUP_BY_STATE = 4
const | ORDER_BY_STATE = 5
const | HAVING_STATE = 6
const | LIMIT_STATE = 7
const | OFFSET_STATE = 8

## Protected Member Functions

| makeOqlObject ()
| handleState ()

## Private Member Functions

| propertyState ()
| fromState ()
| whereState ()
| groupByState ()
| orderByState ()
| havingState ()
| limitState ()
| offsetState ()

## Detailed Description

Parses OQL select query.

Examples:

from User where id = $1 count(id) as count, count(distinct Name) as distinctCount from User (id + -$1) / 2 as idExpression, distinct id from User where (Name not ilike 'user') and id <= 10 and created between $2 and $3 order by id desc, Name asc limit 10 offset $2

from User having $1 > 0 group by id

See also:
  OQL::select
  http://www.hibernate.org/hib_docs/reference/en/html/queryhql.html
  doc/OQL-BNF

Definition at line 32 of file OqlSelectParser.class.php.

## Member Function Documentation

static OqlSelectParser::create | ( |  | ) | `[static]`

Returns:
  OqlSelectParser

Definition at line 47 of file OqlSelectParser.class.php.

Referenced by makeOqlObject(), propertyState(), and OQL::select().

OqlSelectParser::fromState | ( |  | ) | `[private]`

Definition at line 113 of file OqlSelectParser.class.php.

References OqlParser::checkIdentifier(), OqlParser::checkKeyword(), OqlParser::error(), OqlParser::getTokenValue(), ClassUtils::isClassName(), and ClassUtils::isInstanceOf().

Referenced by handleState().

Here is the call graph for this function:

OqlSelectParser::groupByState | ( |  | ) | `[private]`

Definition at line 159 of file OqlSelectParser.class.php.

References OqlParser::checkKeyword(), OqlGroupByParser::create(), OqlParser::parse(), and OqlParser::setTokenizer().

Referenced by handleState().

Here is the call graph for this function:

OqlSelectParser::handleState | ( |  | ) | `[protected]`

Reimplemented from OqlParser.

Definition at line 60 of file OqlSelectParser.class.php.

References fromState(), groupByState(), havingState(), limitState(), offsetState(), orderByState(), propertyState(), and whereState().

Here is the call graph for this function:

OqlSelectParser::havingState | ( |  | ) | `[private]`

Definition at line 189 of file OqlSelectParser.class.php.

References OqlParser::checkKeyword(), OqlHavingParser::create(), OqlParser::parse(), and OqlParser::setTokenizer().

Referenced by handleState().

Here is the call graph for this function:

OqlSelectParser::limitState | ( |  | ) | `[private]`

Definition at line 204 of file OqlSelectParser.class.php.

References OqlParser::checkKeyword(), OqlParser::checkToken(), OqlParser::error(), OqlParser::makeQueryParameter(), OqlToken::NUMBER, and OqlToken::SUBSTITUTION.

Referenced by handleState().

Here is the call graph for this function:

OqlSelectParser::makeOqlObject | ( |  | ) | `[protected]`

Returns:
  OqlSelectQuery

Reimplemented from OqlParser.

Definition at line 55 of file OqlSelectParser.class.php.

References create().

Here is the call graph for this function:

OqlSelectParser::offsetState | ( |  | ) | `[private]`

Definition at line 226 of file OqlSelectParser.class.php.

References OqlParser::checkKeyword(), OqlParser::checkToken(), OqlParser::error(), OqlParser::getTokenValue(), OqlParser::makeQueryParameter(), OqlToken::NUMBER, and OqlToken::SUBSTITUTION.

Referenced by handleState().

Here is the call graph for this function:

OqlSelectParser::orderByState | ( |  | ) | `[private]`

Definition at line 174 of file OqlSelectParser.class.php.

References OqlParser::checkKeyword(), OqlOrderByParser::create(), OqlParser::parse(), and OqlParser::setTokenizer().

Referenced by handleState().

Here is the call graph for this function:

OqlSelectParser::propertyState | ( |  | ) | `[private]`

Definition at line 92 of file OqlSelectParser.class.php.

References OqlParser::checkKeyword(), create(), OqlParser::error(), OqlParser::parse(), and OqlParser::setTokenizer().

Referenced by handleState().

Here is the call graph for this function:

OqlSelectParser::whereState | ( |  | ) | `[private]`

Definition at line 144 of file OqlSelectParser.class.php.

References OqlParser::checkKeyword(), OqlWhereParser::create(), OqlParser::parse(), and OqlParser::setTokenizer().

Referenced by handleState().

Here is the call graph for this function:

## Member Data Documentation

const OqlSelectParser::FROM_STATE = 2

Definition at line 36 of file OqlSelectParser.class.php.

const OqlSelectParser::GROUP_BY_STATE = 4

Definition at line 38 of file OqlSelectParser.class.php.

const OqlSelectParser::HAVING_STATE = 6

Definition at line 40 of file OqlSelectParser.class.php.

const OqlSelectParser::LIMIT_STATE = 7

Definition at line 41 of file OqlSelectParser.class.php.

const OqlSelectParser::OFFSET_STATE = 8

Definition at line 42 of file OqlSelectParser.class.php.

const OqlSelectParser::ORDER_BY_STATE = 5

Definition at line 39 of file OqlSelectParser.class.php.

const OqlSelectParser::PROPERTY_STATE = 1

Definition at line 35 of file OqlSelectParser.class.php.

const OqlSelectParser::WHERE_STATE = 3

Definition at line 37 of file OqlSelectParser.class.php.

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

- main/OQL/Parsers/OqlSelectParser.class.php