Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
1843539f
Commit
1843539f
authored
Jan 13, 2009
by
guilhermeblanco
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2.0] Fixes for DQL BNF
parent
34f4ee71
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
19 deletions
+44
-19
query-language.txt
query-language.txt
+44
-19
No files found.
query-language.txt
View file @
1843539f
...
...
@@ -45,44 +45,71 @@ DeleteStatement ::= DeleteClause [WhereClause]
* IDENTIFIERS
*/
/* Alias Identification usage */
/* Alias Identification usage
(the "u" of "u.name")
*/
IdentificationVariable ::= identifier
/* Alias Identification declaration */
/* Alias Identification declaration
(the "u" of "FROM User u")
*/
AliasIdentificationVariable :: = identifier
/* identifier that must be a class name */
/* identifier that must be a class name
(the "User" of "FROM User u")
*/
AbstractSchemaName ::= identifier
/* identifier that must be a field */
/* identifier that must be a field (the "name" of "u.name") */
/* This is responsable to know if the field exists in Object, no matter if it's a relation or a simple field */
FieldIdentificationVariable ::= identifier
/* identifier that must be a collection-valued association field (to-many) */
/* identifier that must be a collection-valued association field (to-many)
(the "Phonenumbers" of "u.Phonenumbers")
*/
CollectionValuedAssociationField ::= FieldIdentificationVariable
/* identifier that must be a single-valued association field (to-one) */
/* identifier that must be a single-valued association field (to-one)
(the "Group" of "u.Group")
*/
SingleValuedAssociationField ::= FieldIdentificationVariable
/* identifier that must be an embedded class state field (for the future) */
EmbeddedClassStateField ::= FieldIdentificationVariable
/* identifier that must be a simple state field (name, email, ...) */
/* identifier that must be a simple state field (name, email, ...) (the "name" of "u.name") */
/* The difference between this and FieldIdentificationVariable is only semantical, because it points to a single field (not mapping to a relation) */
SimpleStateField ::= FieldIdentificationVariable
/* identifier that must be unique among other mapped field aliases (the "total" of "COUNT(*) AS total")*/
FieldAliasIdentificationVariable = identifier
/*
* PATH EXPRESSIONS
*/
*/
/* "u.Group" or "u.Phonenumbers" declarations */
JoinAssociationPathExpression ::= JoinCollectionValuedPathExpression | JoinSingleValuedAssociationPathExpression
/* "u.Phonenumbers" */
JoinCollectionValuedPathExpression ::= IdentificationVariable "." CollectionValuedAssociationField
/* "u.Group" */
JoinSingleValuedAssociationPathExpression ::= IdentificationVariable "." SingleValuedAssociationField
/* "u.Group" or "u.Phonenumbers" usages */
AssociationPathExpression ::= CollectionValuedPathExpression | SingleValuedAssociationPathExpression
SingleValuedPathExpression ::= StateFieldPathExpression | SingleValuedAssociationPathExpression
StateFieldPathExpression ::= SimpleStateFieldPathExpression | SimpleStateFieldAssociationPathExpression
SingleValuedAssociationPathExpression ::= IdentificationVariable "." {SingleValuedAssociationField "."}* SingleValuedAssociationField
CollectionValuedPathExpression ::= IdentificationVariable "." {SingleValuedAssociationField "."}* CollectionValuedAssociationField
/* "u.name" or "u.Group" */
SingleValuedPathExpression ::= StateFieldPathExpression | SingleValuedAssociationPathExpression
/* "u.name" or "u.Group.name" */
StateFieldPathExpression ::= SimpleStateFieldPathExpression | SimpleStateFieldAssociationPathExpression
/* "u.Group" */
SingleValuedAssociationPathExpression ::= IdentificationVariable "." {SingleValuedAssociationField "."}* SingleValuedAssociationField
/* "u.Group.Permissions" */
CollectionValuedPathExpression ::= IdentificationVariable "." {SingleValuedAssociationField "."}* CollectionValuedAssociationField
/* "name" */
StateField ::= {EmbeddedClassStateField "."}* SimpleStateField
/* "u.name" */
SimpleStateFieldPathExpression ::= IdentificationVariable "." SimpleStateField
/* "u.Group.name" */
SimpleStateFieldAssociationPathExpression ::= SingleValuedAssociationPathExpression "." StateField
...
...
@@ -109,7 +136,7 @@ Subselect ::= SimpleSelectClause SubselectFromClause [WhereClause] [Gr
*/
OrderByItem ::= StateFieldPathExpression ["ASC" | "DESC"]
GroupByItem ::= SingleValuedPathExpression
UpdateItem ::= [IdentificationVariable
"."]
{StateField | SingleValuedAssociationField} "=" NewValue
UpdateItem ::= [IdentificationVariable
"."]
{StateField | SingleValuedAssociationField} "=" NewValue
NewValue ::= SimpleArithmeticExpression | StringPrimary | DatetimePrimary | BooleanPrimary |
EnumPrimary | SimpleEntityExpression | "NULL"
...
...
@@ -118,8 +145,7 @@ NewValue ::= SimpleArithmeticExpression | StringPrimary | DatetimePrimary | B
* FROM/JOIN/INDEX BY
*/
IdentificationVariableDeclaration ::= RangeVariableDeclaration [IndexBy] {JoinVariableDeclaration}*
SubselectIdentificationVariableDeclaration ::= IdentificationVariableDeclaration | AssociationPathExpression
["AS"] AliasIdentificationVariable
SubselectIdentificationVariableDeclaration ::= IdentificationVariableDeclaration | (AssociationPathExpression ["AS"] AliasIdentificationVariable)
JoinVariableDeclaration ::= Join [IndexBy]
RangeVariableDeclaration ::= AbstractSchemaName ["AS"] AliasIdentificationVariable
Join ::= ["LEFT" ["OUTER"] | "INNER"] "JOIN" JoinAssociationPathExpression
...
...
@@ -130,9 +156,8 @@ IndexBy ::= "INDEX" "BY" SimpleStateFieldPath
/*
* SELECT EXPRESSION
*/
SelectExpression ::= IdentificationVariable ["." "*"] |
(StateFieldPathExpression | AggregateExpression |
"(" Subselect ")" ) [["AS"] FieldIdentificationVariable]
SelectExpression ::= IdentificationVariable ["." "*"] | StateFieldPathExpression |
(AggregateExpression | "(" Subselect ")") [["AS"] FieldAliasIdentificationVariable]
SimpleSelectExpression ::= SingleValuedPathExpression | IdentificationVariable | AggregateExpression
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment