phpcr-utils/src/PHPCR/Util/QOM/BaseQomToSqlQueryConverter.php
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\BaseQomToSqlQueryConverter
Package: DefaultCommon base class for the SQL(1) and SQL2 converters
- Children
- \PHPCR\Util\QOM\QomToSql2QueryConverter
- \PHPCR\Util\QOM\QomToSql1QueryConverter
Properties
Methods
convertBindVariable(string $var) : string
BindVariableValue ::= '$'bindVariableName
bindVariableName ::= Prefix
ParametersName | Type | Description |
---|
$var | string | |
---|
Returns convertComparison(\PHPCR\Query\QOM\ComparisonInterface $comparison) : string
Comparison ::= DynamicOperand Operator StaticOperand
Operator ::= EqualTo | NotEqualTo | LessThan |
LessThanOrEqualTo | GreaterThan |
GreaterThanOrEqualTo | Like
EqualTo ::= '='
NotEqualTo ::= '<>'
LessThan ::= '<'
LessThanOrEqualTo ::= '<='
GreaterThan ::= '>'
GreaterThanOrEqualTo ::= '>='
Like ::= 'LIKE'
ParametersReturnsconvertFullTextSearchExpression(string $expr) : string
FullTextSearchExpression ::= BindVariable | ''' FullTextSearchLiteral '''
ParametersName | Type | Description |
---|
$expr | string | |
---|
Returns convertLiteral(mixed $literal) : string
Literal ::= CastLiteral | UncastLiteral
ParametersName | Type | Description |
---|
$literal | mixed | |
---|
Returns convertPath(string $path) : string
Path ::= '[' quotedPath ']' | '[' simplePath ']' | simplePath
quotedPath ::= A JCR Path that contains non-SQL-legal characters
simplePath ::= A JCR Name that contains only SQL-legal characters
ParametersName | Type | Description |
---|
$path | string | |
---|
Returns convertPropertyExistence(\PHPCR\Query\QOM\PropertyExistenceInterface $constraint) : string
PropertyExistence ::=
selectorName'.'propertyName 'IS NOT NULL' |
propertyName 'IS NOT NULL' If only one
selector exists in
this query
Note: The negation, 'NOT x IS NOT NULL'
can be written 'x IS NULL'
ParametersReturnsconvertStaticOperand(\PHPCR\Query\QOM\StaticOperandInterface $operand) : string
StaticOperand ::= Literal | BindVariableValue
Literal ::= CastLiteral | UncastLiteral
CastLiteral ::= 'CAST(' UncastLiteral ' AS ' PropertyType ')'
PropertyType ::= 'STRING' | 'BINARY' | 'DATE' | 'LONG' | 'DOUBLE' |
'DECIMAL' | 'BOOLEAN' | 'NAME' | 'PATH' |
'REFERENCE' | 'WEAKREFERENCE' | 'URI'
UncastLiteral ::= UnquotedLiteral | ''' UnquotedLiteral ''' | '“' UnquotedLiteral '“'
UnquotedLiteral ::= // String form of a JCR Value
BindVariableValue ::= '$'bindVariableName
bindVariableName ::= Prefix
ParametersReturns