phpcr-utils/src/PHPCR/Util/QOM/BaseSqlGenerator.php
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.
\PHPCR\Util\QOM\BaseSqlGenerator
Methods
evalAnd(string $constraint1, string $constraint2) : void
And ::= constraint1 'AND' constraint2
Name | Type | Description |
---|---|---|
$constraint1 | string | |
$constraint2 | string |
evalBindVariable( $var) : string
BindVariableValue ::= '$'bindVariableName bindVariableName ::= Prefix
Name | Type | Description |
---|---|---|
$var |
Type | Description |
---|---|
string |
evalCastLiteral(string $literal, string $type) : string
Cast a literal.
This is different between SQL1 and SQL2.
Name | Type | Description |
---|---|---|
$literal | string | |
$type | string |
Type | Description |
---|---|
string |
evalComparison(string $operand1, string $operator, string $operand2) : void
Comparison ::= DynamicOperand Operator StaticOperand
Name | Type | Description |
---|---|---|
$operand1 | string | |
$operator | string | |
$operand2 | string |
evalLiteral(mixed $literal) : string
Literal ::= CastLiteral | UncastLiteral
Name | Type | Description |
---|---|---|
$literal | mixed |
Type | Description |
---|---|
string |
evalLower(string $operand) : void
LowerCase ::= 'LOWER(' DynamicOperand ')'
Name | Type | Description |
---|---|---|
$operand | string |
evalNot(string $constraint) : void
Not ::= 'NOT' Constraint
Name | Type | Description |
---|---|---|
$constraint | string |
evalOperator(string $operator) : void
Operator ::= EqualTo | NotEqualTo | LessThan | LessThanOrEqualTo | GreaterThan | GreaterThanOrEqualTo | Like
Name | Type | Description |
---|---|---|
$operator | string |
evalOr(string $constraint1, string $constraint2) : void
Or ::= constraint1 'OR' constraint2
Name | Type | Description |
---|---|---|
$constraint1 | string | |
$constraint2 | string |
evalOrder( $order) : string
Order ::= Ascending | Descending Ascending ::= 'ASC' Descending ::= 'DESC'
Name | Type | Description |
---|---|---|
$order |
Type | Description |
---|---|
string |
evalOrdering( $operand, $order) : string
Ordering ::= DynamicOperand [Order]
Name | Type | Description |
---|---|---|
$operand | ||
$order |
Type | Description |
---|---|
string |
evalOrderings( $orderings) : string
orderings ::= Ordering {',' Ordering}
Name | Type | Description |
---|---|---|
$orderings |
Type | Description |
---|---|
string |
evalPath(string $path) : string
Evaluate a path.
This is different between SQL1 and SQL2.
Name | Type | Description |
---|---|---|
$path | string |
Type | Description |
---|---|
string |
evalQuery(string $source, string $columns, string $constraint = '', string $orderings = '') : string
Query ::= 'SELECT' columns 'FROM' Source ['WHERE' Constraint] ['ORDER BY' orderings]
Name | Type | Description |
---|---|---|
$source | string | |
$columns | string | |
$constraint | string | |
$orderings | string |
Type | Description |
---|---|
string |