-
Notifications
You must be signed in to change notification settings - Fork 45
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
JSON: function "query" #157
Conversation
But if
(to find applications by under-age candidates) would be converted into
which makes sense if the implicit casting rules for OData common expressions are the same as for SQL. But
could then not be converted into SQL without parsing JSON, since Perhaps it is better to have three functions:
|
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.
TC 2024-04-03 agrees to have return-type-specific functions JSON.stringValue
, JSON.intValue
etc.
Alternative: single JSON_QUERY function with optional 3rd parameter that specified return type. The type of this function would have to be Edm.Untyped; may still have to cast to compose in expression. Other alternative: have different functions for each type to be returned, thus avoiding the cast. It would be more extensible to pass a type name to return as, but then the return type of the function would not be strongly typed (it would have to be Edm.Untyped) so it would have to be cast in an expression/annotated in a response. If there are only a handful of types that may be returned, we can define separate functions for each return type which would improve usability. |
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.
LGTM.
Resolves https://issues.oasis-open.org/browse/ODATA-1336
Check which syntax elements are supported by which implementation