phpcr-utils/src/PHPCR/Util/QOM/Sql2ToQomQueryConverter.php

Show: PublicProtectedPrivateinherited
Table of Contents
This file is part of the PHPCR Utils

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

License
Apache Software License 2.0  
Link
http://phpcr.github.com/  

\PHPCR\Util\QOM\Sql2ToQomQueryConverter

Package: Default
Parse SQL2 statements and output a corresponding QOM objects tree

Properties

>VPropertyprotected\PHPCR\Query\QOM\QueryObjectModelFactoryInterface $factory
The factory to create QOM objects
>VPropertyprotected\PHPCR\Util\QOM\Sql2Scanner; $scanner
Scanner to parse SQL2
Details
Type
\PHPCR\Util\QOM\Sql2Scanner;
>VPropertyprotectedstring $sql2
The SQL2 query (the converter is not reentrant)
Details
Type
string

Methods

methodpublic__construct(\PHPCR\Query\QOM\QueryObjectModelFactoryInterface $factory) : void

Instantiate a converter

Parameters
NameTypeDescription
$factory\PHPCR\Query\QOM\QueryObjectModelFactoryInterface
methodprivatefetchTokenWithoutBrackets() : string

Get the next token and make sure to remove the brackets if the token is in the [ns:name] notation

Returns
TypeDescription
string
methodpublicparse(string $sql2) : \PHPCR\Query\QOM\QueryObjectModelInterface;

6.7.1.

Query Parse an SQL2 query and return the corresponding QOM QueryObjectModel

Parameters
NameTypeDescription
$sql2string
Returns
TypeDescription
\PHPCR\Query\QOM\QueryObjectModelInterface;
methodprotectedparseChildNode() : void

6.7.21 ChildNode

methodprotectedparseChildNodeJoinCondition() : \PHPCR\Query\QOM\ChildNodeJoinConditionInterface

6.7.10 ChildNodeJoinCondition Parse an SQL2 child node join condition and return a QOM\ChildNodeJoinCondition

methodprotectedparseColumn() : \PHPCR\Query\QOM\ColumnInterface

Parse a single SQL2 column definition and return a QOM\Column

Returns
TypeDescription
\PHPCR\Query\QOM\ColumnInterface
methodprotectedparseColumns() : array

6.7.39 Column Parse an SQL2 columns definition and return an array of QOM\Column

Returns
TypeDescription
arrayof array
methodprotectedparseComparison() : \PHPCR\Query\QOM\ComparisonInterface

6.7.16 Comparison

methodprotectedparseConstraint() : \PHPCR\Query\QOM\ConstraintInterface

6.7.12 Constraint 6.7.13 And 6.7.14 Or

methodprotectedparseDescendantNode() : void

6.7.22 DescendantNode

methodprotectedparseDescendantNodeJoinCondition() : \PHPCR\Query\QOM\DescendantNodeJoinConditionInterface

6.7.11 DescendantNodeJoinCondition Parse an SQL2 descendant node join condition and return a QOM\DescendantNodeJoinCondition

methodprotectedparseDynamicOperand() : \PHPCR\Query\QOM\DynamicOperandInterface

6.7.26 DynamicOperand 6.7.28 Length 6.7.29 NodeName 6.7.30 NodeLocalName 6.7.31 FullTextSearchScore 6.7.32 LowerCase 6.7.33 UpperCase Parse an SQL2 dynamic operand

methodprotectedparseEquiJoin() : \PHPCR\Query\QOM\EquiJoinConditionInterface

6.7.8.

EquiJoinCondition Parse an SQL2 equijoin condition and return a QOM\EquiJoinCondition

Returns
TypeDescription
\PHPCR\Query\QOM\EquiJoinConditionInterface
methodprotectedparseFullTextSearch() : \PHPCR\Query\QOM\FullTextSearchInterface

6.7.19 FullTextSearch

methodprivateparseIdentifier() : array

Parse something that is expected to be a property identifier.

Returns
TypeDescription
arraywith property name and selector name if specified, null otherwise
methodprotectedparseJoin(string $leftSelector) : void

6.7.5.

Join 6.7.6. Join type Parse an SQL2 join source and return a QOM\Join

Parameters
NameTypeDescription
$leftSelectorstring

the left selector as it has been read by parseSource return \PHPCR\Query\QOM\JoinInterface

methodprotectedparseJoinCondition() : \PHPCR\Query\QOM\JoinConditionInterface

6.7.7.

JoinCondition Parse an SQL2 join condition and return a QOM\Joincondition

Returns
TypeDescription
\PHPCR\Query\QOM\JoinConditionInterface
methodprotectedparseJoinType() : string

6.7.6.

Join type

Returns
TypeDescription
string
methodprotectedparseLiteral() : \PHPCR\Query\QOM\LiteralInterface

6.7.34 Literal Parse an SQL2 literal value

Returns
TypeDescription
\PHPCR\Query\QOM\LiteralInterface
methodprotectedparseName() : string

6.7.4.

Name

Returns
TypeDescription
string
methodprotectedparseNot() : \PHPCR\Query\QOM\NotInterface

6.7.15 Not

Returns
TypeDescription
\PHPCR\Query\QOM\NotInterface
methodprotectedparseOperator() : string

6.7.17 Operator

Returns
TypeDescription
stringa constant from QueryObjectModelConstantsInterface
methodprotectedparseOrdering() : void

6.7.38 Order

methodprotectedparseOrderings() : void

6.7.37 Ordering

methodprotectedparsePath() : void

Parse a JCR path consisting of either a simple path (a JCR name that contains only SQL-legal characters) or a path (simple path or quoted path) enclosed in square brackets.

See JCR Spec § 6.7.23.

6.7.23. Path

methodprotectedparsePropertyExistence() : \PHPCR\Query\QOM\PropertyExistenceInterface

6.7.18 PropertyExistence

methodprotectedparsePropertyValue() : \PHPCR\Query\QOM\PropertyValueInterface

6.7.27 PropertyValue Parse an SQL2 property value

methodprotectedparseSameNode() : void

6.7.20 SameNode

methodprotectedparseSameNodeJoinCondition() : \PHPCR\Query\QOM\SameNodeJoinConditionInterface

6.7.9 SameNodeJoinCondition Parse an SQL2 same node join condition and return a QOM\SameNodeJoinCondition

methodprotectedparseSelector() : \PHPCR\Query\QOM\SelectorInterface

6.7.3.

Selector Parse an SQL2 selector and return a QOM\Selector

Returns
TypeDescription
\PHPCR\Query\QOM\SelectorInterface
methodprotectedparseSource() : \PHPCR\Query\QOM\SourceInterface

6.7.2.

Source Parse an SQL2 source definition and return the corresponding QOM Source

Returns
TypeDescription
\PHPCR\Query\QOM\SourceInterface
methodprotectedparseStaticOperand() : \PHPCR\Query\QOM\StaticOperandInterface

Parse an SQL2 static operand 6.7.35 BindVariable 6.7.36 Prefix

Documentation was generated by phpDocumentor 2.0.0a12.