phpcr-utils/src/PHPCR/Util/QOM/Sql1Generator.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\Sql1Generator
Package: DefaultGenerate SQL1 statements
TODO: is eval... the best name for the functions here?
- Parent(s)
- \PHPCR\Util\QOM\BaseSqlGenerator
Methods
evalChildNode(string $path, string $selectorName = null) : void
SameNode ::= 'jcr:path like Path/% and not jcr:path like Path/%/%'
ParametersName | Type | Description |
---|
$path | string | |
---|
$selectorName | string | |
---|
evalColumn(string $selectorName = null, string $propertyName = null) : string
Column ::= (propertyName)
propertyName ::= Name
No support for column name ('AS' columnName) in SQL1
ParametersName | Type | Description |
---|
$selectorName | string | unused in SQL1 |
---|
$propertyName | string | |
---|
ReturnsevalColumns( $columns) : string
columns ::= (Column ',' {Column}) | '*'
ParametersName | Type | Description |
---|
$columns | | |
---|
Returns evalDescendantNode(string $path) : string
Emulate descendant query with LIKE query
ParametersName | Type | Description |
---|
$path | string | |
---|
Returns evalFullTextSearch(string $selectorName, string $searchExpression, string $propertyName = null) : string
FullTextSearch ::=
'CONTAINS(' (propertyName | '*') ') ','
FullTextSearchExpression ')'
FullTextSearchExpression ::= BindVariable | ''' FullTextSearchLiteral '''
ParametersName | Type | Description |
---|
$selectorName | string | unusued |
---|
$searchExpression | string | |
---|
$propertyName | string | |
---|
Returns evalPath(string $path) : string
Path ::= simplePath
simplePath ::= A JCR Name that contains only SQL-legal characters
This is different between SQL1 and SQL2.
ParametersName | Type | Description |
---|
$path | string | |
---|
ReturnsevalPropertyExistence(string $selectorName, string $propertyName) : string
PropertyExistence ::=
propertyName 'IS NOT NULL'
ParametersName | Type | Description |
---|
$selectorName | string | declared to simplifiy interface - as there
are no joins in SQL1 there is no need for a selector.
|
---|
$propertyName | string | |
---|
Returns evalPropertyValue(string $propertyName, string $selectorName = null) : void
PropertyValue ::= propertyName
ParametersName | Type | Description |
---|
$propertyName | string | |
---|
$selectorName | string | unused in SQL1 |
---|
evalSelector(string $nodeTypeName, string $selectorName = null) : string
Selector ::= nodeTypeName
nodeTypeName ::= Name
ParametersName | Type | Description |
---|
$nodeTypeName | string | The node type of the selector. If it does not contain starting and ending brackets ([]) they will be added automatically
|
---|
$selectorName | string | (unused)
|
---|
Returns