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) : voidSameNode ::= 'jcr:path like Path/% and not jcr:path like Path/%/%'
Parameters| Name | Type | Description |
|---|
| $path | string | |
|---|
| $selectorName | string | |
|---|



evalColumn(string $selectorName = null, string $propertyName = null) : stringColumn ::= (propertyName)
propertyName ::= Name
No support for column name ('AS' columnName) in SQL1
Parameters| Name | Type | Description |
|---|
| $selectorName | string | unused in SQL1 |
|---|
| $propertyName | string | |
|---|
Returns


evalColumns( $columns) : stringcolumns ::= (Column ',' {Column}) | '*'
Parameters| Name | Type | Description |
|---|
| $columns | | |
|---|
Returns 


evalDescendantNode(string $path) : stringEmulate descendant query with LIKE query
Parameters| Name | Type | Description |
|---|
| $path | string | |
|---|
Returns 


evalFullTextSearch(string $selectorName, string $searchExpression, string $propertyName = null) : stringFullTextSearch ::=
'CONTAINS(' (propertyName | '*') ') ','
FullTextSearchExpression ')'
FullTextSearchExpression ::= BindVariable | ''' FullTextSearchLiteral '''
Parameters| Name | Type | Description |
|---|
| $selectorName | string | unusued |
|---|
| $searchExpression | string | |
|---|
| $propertyName | string | |
|---|
Returns 


evalPath(string $path) : stringPath ::= simplePath
simplePath ::= A JCR Name that contains only SQL-legal characters
This is different between SQL1 and SQL2.
Parameters| Name | Type | Description |
|---|
| $path | string | |
|---|
Returns


evalPropertyExistence(string $selectorName, string $propertyName) : stringPropertyExistence ::=
propertyName 'IS NOT NULL'
Parameters| Name | 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) : voidPropertyValue ::= propertyName
Parameters| Name | Type | Description |
|---|
| $propertyName | string | |
|---|
| $selectorName | string | unused in SQL1 |
|---|



evalSelector(string $nodeTypeName, string $selectorName = null) : stringSelector ::= nodeTypeName
nodeTypeName ::= Name
Parameters| Name | 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