Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add $count to select #123

Open
wants to merge 8 commits into
base: v4.02-release-candidate
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 32 additions & 18 deletions abnf/odata-abnf-construction-rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -298,27 +298,33 @@ expandItem = "$value"
/ expandPath
/ optionallyQualifiedEntityTypeName "/" expandPath
expandPath = ( STAR [ ref / OPEN levels CLOSE ]
/ ( navigationProperty / entityAnnotationInQuery ) [ "/" optionallyQualifiedEntityTypeName ]
[ ref [ OPEN expandRefOption *( SEMI expandRefOption ) CLOSE ]
/ count [ OPEN expandCountOption *( SEMI expandCountOption ) CLOSE ]
/ ( entityNavigationProperty / entityAnnotationInQuery ) [ "/" optionallyQualifiedEntityTypeName ]
[ ref
/ OPEN entityOption *( SEMI entityOption ) CLOSE
]
/ ( entityColNavigationProperty / entityColAnnotationInQuery ) [ "/" optionallyQualifiedEntityTypeName ]
[ ref [ OPEN colOption *( SEMI colOption ) CLOSE ]
/ count [ OPEN countOption *( SEMI countOption ) CLOSE ]
/ OPEN expandOption *( SEMI expandOption ) CLOSE
]
/ ( complexProperty / complexColProperty / optionallyQualifiedComplexTypeName / complexAnnotationInQuery ) "/" expandPath
/ ( complexProperty / complexColProperty / optionallyQualifiedComplexTypeName / complexAnnotationInQuery / complexColAnnotationInQuery) "/" expandPath
/ streamProperty
)
expandCountOption = filter
countOption = filter
/ search
expandRefOption = expandCountOption
colOption = countOption
/ orderby
/ skip
/ top
/ inlinecount
expandOption = expandRefOption
/ select
/ expand
structOption = select
/ compute
/ levels
/ aliasAndValue
entityOption = structOption
/ expand
/ levels
expandOption = colOption
/ entityOption

levels = ( "$levels" / "levels" ) EQ ( oneToNine *DIGIT / "max" )

Expand Down Expand Up @@ -389,15 +395,21 @@ selectItem = STAR
/ optionallyQualifiedFunctionName
)
selectProperty = primitiveProperty / primitiveAnnotationInQuery
/ ( primitiveColProperty / primitiveColAnnotationInQuery ) [ OPEN selectOptionPC *( SEMI selectOptionPC ) CLOSE ]
/ navigationProperty
/ selectPath [ OPEN selectOption *( SEMI selectOption ) CLOSE
/ selectPath [ OPEN structOption *( SEMI structOption ) CLOSE
/ "/" selectProperty
]
selectPath = ( complexProperty / complexColProperty / complexAnnotationInQuery ) [ "/" optionallyQualifiedComplexTypeName ]
selectOptionPC = filter / search / inlinecount / orderby / skip / top
selectOption = selectOptionPC
/ compute / select / aliasAndValue
/ selectColPath [ count [ OPEN countOption *( SEMI countOption ) CLOSE ]
/ OPEN selectOption *( SEMI selectOption ) CLOSE
/ "/" selectProperty
]
/ ( primitiveColProperty / primitiveColAnnotationInQuery )
[ count [ OPEN countOption *( SEMI countOption ) CLOSE ]
/ OPEN colOption *( SEMI colOption ) CLOSE
]
/ navigationProperty
selectPath = ( complexProperty / complexAnnotationInQuery ) [ "/" optionallyQualifiedComplexTypeName ]
selectColPath = ( complexColProperty / complexColAnnotationInQuery ) [ "/" optionallyQualifiedComplexTypeName ]
selectOption = colOption / structOption

allOperationsInSchema = namespace "." STAR

Expand Down Expand Up @@ -425,7 +437,9 @@ customName = qchar-no-AMP-EQ-AT-DOLLAR *( qchar-no-AMP-EQ )
customValue = *( qchar-no-AMP )

complexAnnotationInQuery = annotationInQuery ; complex-valued annotation
complexColAnnotationInQuery = annotationInQuery ; complex collection-valued annotation
entityAnnotationInQuery = annotationInQuery ; entity-valued annotation
entityColAnnotationInQuery = annotationInQuery ; entity collection-valued annotation

primitiveAnnotationInQuery = annotationInQuery ; primitive-valued annotation
primitiveColAnnotationInQuery = annotationInQuery ; primitive collection-valued annotation
Expand Down Expand Up @@ -595,7 +609,7 @@ filterExpr = %s"/$filter" OPEN boolCommonExpr CLOSE
complexColPathExpr = collectionPathExpr
/ "/" optionallyQualifiedComplexTypeName [ collectionPathExpr ]

collectionPathExpr = count [ OPEN expandCountOption *( SEMI expandCountOption ) CLOSE ]
collectionPathExpr = count [ OPEN countOption *( SEMI countOption ) CLOSE ]
/ filterExpr [ collectionPathExpr ]
/ "/" anyExpr
/ "/" allExpr
Expand Down
Loading