-
Notifications
You must be signed in to change notification settings - Fork 352
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
Improve $count in $filter collection properties #2069
Improve $count in $filter collection properties #2069
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/Microsoft.OData.Core/UriParser/Parsers/UriQueryExpressionParser.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.OData.Core/UriParser/Parsers/CountSegmentParser.cs
Outdated
Show resolved
Hide resolved
...lTests/Microsoft.OData.Core.Tests/ScenarioTests/UriParser/FilterAndOrderByFunctionalTests.cs
Show resolved
Hide resolved
src/Microsoft.OData.Core/UriParser/Parsers/CountSegmentParser.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.OData.Core/UriParser/Parsers/CountSegmentParser.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.OData.Core/UriParser/Parsers/CountSegmentParser.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.OData.Core/UriParser/SyntacticAst/CountSegmentToken.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.OData.Core/UriParser/Parsers/UriQueryExpressionParser.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.OData.Core/UriParser/Parsers/CountSegmentParser.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.OData.Core/UriParser/Parsers/CountSegmentParser.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.OData.Core/UriParser/SyntacticAst/CountSegmentToken.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕐
/// Read a query option within the $count brackets. | ||
/// </summary> | ||
/// <returns>The query option as a string.</returns> | ||
private string ReadQueryOption() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the new factoring much better -- thanks. A few minor suggestions, but looks good to me. |
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
Description
Currently ODL supports
$filter=navProp/$count gt 2
$filter=collectionProp/$count gt 2
It doesn't support
$filter
and$search
within $count.Spec: http://docs.oasis-open.org/odata/odata/v4.01/cs01/part1-protocol/odata-v4.01-cs01-part1-protocol.html#sec_RequestingtheNumberofItemsinaCollect
This PR add support for the following:
$filter=navProp/$count($filter=prop gt 1) gt 2
$filter=navProp/$count($search=prop) eq 'abc'
$filter=collectionProp/$count($filter=prop gt 1) gt 2
$filter=collectionProp/$count($search=prop) eq 'abc'
Checklist (Uncheck if it is not completed)
Additional work necessary
If documentation update is needed, please add "Docs Needed" label to the issue and provide details about the required document change in the issue.