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]
...
@@ -45,44 +45,71 @@ DeleteStatement ::= DeleteClause [WhereClause]
* IDENTIFIERS
* IDENTIFIERS
*/
*/
/* Alias Identification usage */
/* Alias Identification usage
(the "u" of "u.name")
*/
IdentificationVariable ::= identifier
IdentificationVariable ::= identifier
/* Alias Identification declaration */
/* Alias Identification declaration
(the "u" of "FROM User u")
*/
AliasIdentificationVariable :: = identifier
AliasIdentificationVariable :: = identifier
/* identifier that must be a class name */
/* identifier that must be a class name
(the "User" of "FROM User u")
*/
AbstractSchemaName ::= identifier
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
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
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
SingleValuedAssociationField ::= FieldIdentificationVariable
/* identifier that must be an embedded class state field (for the future) */
/* identifier that must be an embedded class state field (for the future) */
EmbeddedClassStateField ::= FieldIdentificationVariable
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
SimpleStateField ::= FieldIdentificationVariable
/* identifier that must be unique among other mapped field aliases (the "total" of "COUNT(*) AS total")*/
FieldAliasIdentificationVariable = identifier
/*
/*
* PATH EXPRESSIONS
* PATH EXPRESSIONS
*/
*/
/* "u.Group" or "u.Phonenumbers" declarations */
JoinAssociationPathExpression ::= JoinCollectionValuedPathExpression | JoinSingleValuedAssociationPathExpression
JoinAssociationPathExpression ::= JoinCollectionValuedPathExpression | JoinSingleValuedAssociationPathExpression
/* "u.Phonenumbers" */
JoinCollectionValuedPathExpression ::= IdentificationVariable "." CollectionValuedAssociationField
JoinCollectionValuedPathExpression ::= IdentificationVariable "." CollectionValuedAssociationField
/* "u.Group" */
JoinSingleValuedAssociationPathExpression ::= IdentificationVariable "." SingleValuedAssociationField
JoinSingleValuedAssociationPathExpression ::= IdentificationVariable "." SingleValuedAssociationField
/* "u.Group" or "u.Phonenumbers" usages */
AssociationPathExpression ::= CollectionValuedPathExpression | SingleValuedAssociationPathExpression
AssociationPathExpression ::= CollectionValuedPathExpression | SingleValuedAssociationPathExpression
SingleValuedPathExpression ::= StateFieldPathExpression | SingleValuedAssociationPathExpression
StateFieldPathExpression ::= SimpleStateFieldPathExpression | SimpleStateFieldAssociationPathExpression
/* "u.name" or "u.Group" */
SingleValuedAssociationPathExpression ::= IdentificationVariable "." {SingleValuedAssociationField "."}* SingleValuedAssociationField
SingleValuedPathExpression ::= StateFieldPathExpression | SingleValuedAssociationPathExpression
CollectionValuedPathExpression ::= IdentificationVariable "." {SingleValuedAssociationField "."}* CollectionValuedAssociationField
/* "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
StateField ::= {EmbeddedClassStateField "."}* SimpleStateField
/* "u.name" */
SimpleStateFieldPathExpression ::= IdentificationVariable "." SimpleStateField
SimpleStateFieldPathExpression ::= IdentificationVariable "." SimpleStateField
/* "u.Group.name" */
SimpleStateFieldAssociationPathExpression ::= SingleValuedAssociationPathExpression "." StateField
SimpleStateFieldAssociationPathExpression ::= SingleValuedAssociationPathExpression "." StateField
...
@@ -109,7 +136,7 @@ Subselect ::= SimpleSelectClause SubselectFromClause [WhereClause] [Gr
...
@@ -109,7 +136,7 @@ Subselect ::= SimpleSelectClause SubselectFromClause [WhereClause] [Gr
*/
*/
OrderByItem ::= StateFieldPathExpression ["ASC" | "DESC"]
OrderByItem ::= StateFieldPathExpression ["ASC" | "DESC"]
GroupByItem ::= SingleValuedPathExpression
GroupByItem ::= SingleValuedPathExpression
UpdateItem ::= [IdentificationVariable
"."]
{StateField | SingleValuedAssociationField} "=" NewValue
UpdateItem ::= [IdentificationVariable
"."]
{StateField | SingleValuedAssociationField} "=" NewValue
NewValue ::= SimpleArithmeticExpression | StringPrimary | DatetimePrimary | BooleanPrimary |
NewValue ::= SimpleArithmeticExpression | StringPrimary | DatetimePrimary | BooleanPrimary |
EnumPrimary | SimpleEntityExpression | "NULL"
EnumPrimary | SimpleEntityExpression | "NULL"
...
@@ -118,8 +145,7 @@ NewValue ::= SimpleArithmeticExpression | StringPrimary | DatetimePrimary | B
...
@@ -118,8 +145,7 @@ NewValue ::= SimpleArithmeticExpression | StringPrimary | DatetimePrimary | B
* FROM/JOIN/INDEX BY
* FROM/JOIN/INDEX BY
*/
*/
IdentificationVariableDeclaration ::= RangeVariableDeclaration [IndexBy] {JoinVariableDeclaration}*
IdentificationVariableDeclaration ::= RangeVariableDeclaration [IndexBy] {JoinVariableDeclaration}*
SubselectIdentificationVariableDeclaration ::= IdentificationVariableDeclaration | AssociationPathExpression
SubselectIdentificationVariableDeclaration ::= IdentificationVariableDeclaration | (AssociationPathExpression ["AS"] AliasIdentificationVariable)
["AS"] AliasIdentificationVariable
JoinVariableDeclaration ::= Join [IndexBy]
JoinVariableDeclaration ::= Join [IndexBy]
RangeVariableDeclaration ::= AbstractSchemaName ["AS"] AliasIdentificationVariable
RangeVariableDeclaration ::= AbstractSchemaName ["AS"] AliasIdentificationVariable
Join ::= ["LEFT" ["OUTER"] | "INNER"] "JOIN" JoinAssociationPathExpression
Join ::= ["LEFT" ["OUTER"] | "INNER"] "JOIN" JoinAssociationPathExpression
...
@@ -130,9 +156,8 @@ IndexBy ::= "INDEX" "BY" SimpleStateFieldPath
...
@@ -130,9 +156,8 @@ IndexBy ::= "INDEX" "BY" SimpleStateFieldPath
/*
/*
* SELECT EXPRESSION
* SELECT EXPRESSION
*/
*/
SelectExpression ::= IdentificationVariable ["." "*"] |
SelectExpression ::= IdentificationVariable ["." "*"] | StateFieldPathExpression |
(StateFieldPathExpression | AggregateExpression |
(AggregateExpression | "(" Subselect ")") [["AS"] FieldAliasIdentificationVariable]
"(" Subselect ")" ) [["AS"] FieldIdentificationVariable]
SimpleSelectExpression ::= SingleValuedPathExpression | IdentificationVariable | AggregateExpression
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