phpcr-utils/src/PHPCR/Util/QOM/BaseSqlGenerator.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\BaseSqlGenerator

Package: Default
Common base class for SQL(1) and SQL2 generators
Children
\PHPCR\Util\QOM\Sql2Generator
\PHPCR\Util\QOM\Sql1Generator

Methods

methodpublicevalAnd(string $constraint1, string $constraint2) : void

And ::= constraint1 'AND' constraint2

Parameters
NameTypeDescription
$constraint1string
$constraint2string
methodpublicevalBindVariable( $var) : string

BindVariableValue ::= '$'bindVariableName bindVariableName ::= Prefix

Parameters
NameTypeDescription
$var
Returns
TypeDescription
string
methodpublicevalCastLiteral(string $literal, string $type) : string
abstract

Cast a literal.

This is different between SQL1 and SQL2.

Parameters
NameTypeDescription
$literalstring
$typestring
Returns
TypeDescription
string
methodpublicevalComparison(string $operand1, string $operator, string $operand2) : void

Comparison ::= DynamicOperand Operator StaticOperand

Parameters
NameTypeDescription
$operand1string
$operatorstring
$operand2string
methodpublicevalLiteral(mixed $literal) : string

Literal ::= CastLiteral | UncastLiteral

Parameters
NameTypeDescription
$literalmixed
Returns
TypeDescription
string
methodpublicevalLower(string $operand) : void

LowerCase ::= 'LOWER(' DynamicOperand ')'

Parameters
NameTypeDescription
$operandstring
methodpublicevalNot(string $constraint) : void

Not ::= 'NOT' Constraint

Parameters
NameTypeDescription
$constraintstring
methodpublicevalOperator(string $operator) : void

Operator ::= EqualTo | NotEqualTo | LessThan | LessThanOrEqualTo | GreaterThan | GreaterThanOrEqualTo | Like

Parameters
NameTypeDescription
$operatorstring
methodpublicevalOr(string $constraint1, string $constraint2) : void

Or ::= constraint1 'OR' constraint2

Parameters
NameTypeDescription
$constraint1string
$constraint2string
methodpublicevalOrder( $order) : string

Order ::= Ascending | Descending Ascending ::= 'ASC' Descending ::= 'DESC'

Parameters
NameTypeDescription
$order
Returns
TypeDescription
string
methodpublicevalOrdering( $operand,  $order) : string

Ordering ::= DynamicOperand [Order]

Parameters
NameTypeDescription
$operand
$order
Returns
TypeDescription
string
methodpublicevalOrderings( $orderings) : string

orderings ::= Ordering {',' Ordering}

Parameters
NameTypeDescription
$orderings
Returns
TypeDescription
string
methodpublicevalPath(string $path) : string
abstract

Evaluate a path.

This is different between SQL1 and SQL2.

Parameters
NameTypeDescription
$pathstring
Returns
TypeDescription
string
methodpublicevalQuery(string $source, string $columns, string $constraint = '', string $orderings = '') : string

Query ::= 'SELECT' columns 'FROM' Source ['WHERE' Constraint] ['ORDER BY' orderings]

Parameters
NameTypeDescription
$sourcestring
$columnsstring
$constraintstring
$orderingsstring
Returns
TypeDescription
string
methodpublicevalUpper(string $operand) : void

LowerCase ::= 'UPPER(' DynamicOperand ')'

Parameters
NameTypeDescription
$operandstring
Documentation was generated by phpDocumentor 2.0.0a12.