-
Notifications
You must be signed in to change notification settings - Fork 179
Support SingleResourceCastNode for unquoted type parameters in BindIsOf and BindCastSingleValue #1511
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
Conversation
|
/AzurePipelines run |
|
No pipelines are associated with this pull request. |
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.
Pull Request Overview
This PR adds support for SingleResourceCastNode in unquoted type parameters for isof and cast functions in OData query binding. The change enables proper handling of unquoted type names in these functions, which were previously only supporting quoted type names through ConstantNode.
Key changes include:
- Updated OData library dependency from 8.2.3 to 8.4.0
- Enhanced
BindIsOfandBindCastSingleValuemethods to handle bothConstantNodeandSingleResourceCastNodetype parameters - Updated test cases to reflect the new behavior where unquoted type parameters no longer throw exceptions
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tool/builder.versions.settings.targets | Updates OData library dependency version range |
| src/Microsoft.AspNetCore.OData/Microsoft.AspNetCore.OData.csproj | Updates OData package references to version 8.4.0 |
| sample/ODataRoutingSample/ODataRoutingSample.csproj | Removes direct OData.Edm package reference |
| src/Microsoft.AspNetCore.OData/Query/Expressions/QueryBinder.SingleValueFunctionCall.cs | Adds SingleResourceCastNode support to BindIsOf and BindCastSingleValue methods |
| src/Microsoft.AspNetCore.OData/Query/Expressions/ExpressionBinderBase.cs | Adds SingleResourceCastNode support to BindIsOf and BindCastSingleValue methods |
| test/Microsoft.AspNetCore.OData.Tests/Query/Validator/FilterQueryValidatorTests.cs | Updates test cases to include both quoted and unquoted type parameter scenarios |
| test/Microsoft.AspNetCore.OData.Tests/Query/Expressions/FilterBinderTests.cs | Updates test expectations for unquoted type parameters and error messages |
| test/Microsoft.AspNetCore.OData.E2E.Tests/IsOfAndCast/IsOfAndCastTests.cs | Adds comprehensive E2E tests for cast and isof functions with both quoted and unquoted type parameters |
| test/Microsoft.AspNetCore.OData.E2E.Tests/IsOfAndCast/IsOfAndCastEdmModel.cs | Defines EDM model for E2E tests |
| test/Microsoft.AspNetCore.OData.E2E.Tests/IsOfAndCast/IsOfAndCastDataSource.cs | Provides test data for E2E tests |
| test/Microsoft.AspNetCore.OData.E2E.Tests/IsOfAndCast/IsOfAndCastDataModel.cs | Defines data models for E2E tests |
| test/Microsoft.AspNetCore.OData.E2E.Tests/IsOfAndCast/IsOfAndCastController.cs | Implements controller for E2E tests |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/Microsoft.AspNetCore.OData/Query/Expressions/ExpressionBinderBase.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.AspNetCore.OData/Query/Expressions/ExpressionBinderBase.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.AspNetCore.OData/Query/Expressions/QueryBinder.SingleValueFunctionCall.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.AspNetCore.OData/Query/Expressions/QueryBinder.SingleValueFunctionCall.cs
Outdated
Show resolved
Hide resolved
test/Microsoft.AspNetCore.OData.E2E.Tests/IsOfAndCast/IsOfAndCastTests.cs
Show resolved
Hide resolved
test/Microsoft.AspNetCore.OData.Tests/Query/Expressions/FilterBinderTests.cs
Outdated
Show resolved
Hide resolved
test/Microsoft.AspNetCore.OData.Tests/Query/Expressions/FilterBinderTests.cs
Outdated
Show resolved
Hide resolved
test/Microsoft.AspNetCore.OData.Tests/Query/Expressions/FilterBinderTests.cs
Show resolved
Hide resolved
test/Microsoft.AspNetCore.OData.Tests/Query/Expressions/FilterBinderTests.cs
Outdated
Show resolved
Hide resolved
test/Microsoft.AspNetCore.OData.Tests/Query/Expressions/FilterBinderTests.cs
Outdated
Show resolved
Hide resolved
test/Microsoft.AspNetCore.OData.Tests/Query/Expressions/FilterBinderTests.cs
Outdated
Show resolved
Hide resolved
…eryNode is not possible
…Of and BindCastSingleValue (#1511) * Handle SingleResourceCastNode conversion * bump ODL version and fix failing tests
…Of and BindCastSingleValue (OData#1511)
…Of and BindCastSingleValue (OData#1511)
…Of and BindCastSingleValue (OData#1511)
…Of and BindCastSingleValue (OData#1511)
…Of and BindCastSingleValue (OData#1511)
…Of and BindCastSingleValue (OData#1511)
…Of and BindCastSingleValue (OData#1511)
…Of and BindCastSingleValue (OData#1511)
Currently, the unquoted type parameter in
isofandcastis bind asSingleResourceCastNodeinODLintroduced by PR OData/odata.net#3117, but theBindIsOfandBindCastSingleValuemethods only handleConstantNode.This PR
isofandcastunquoted type paramsisofandcastfunction callsODL PR: OData/odata.net#3117