[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [OASIS Issue Tracker] (ODATA-827) introduce $compute query option
[ https://issues.oasis-open.org/browse/ODATA-827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61323#comment-61323 ]
Michael Pizzo commented on ODATA-827:
-------------------------------------
How would this work if I wanted to include the results of a bound function call? Would I do something like:
GET ~Products?$compute=ns.RecentSalesByManager(Manager='Bob') as recentSales&$select=*,recentSales
If so, does this give us an alternate syntax for expand?
GET ~Customers?$compute=Orders as salesOrders&$select=*,salesOrders
I'd rather not introduce another way to do $expand. Should we use $expand for any time we want to extend the members of the entity (versus arbitrary transformations in $apply)? For example, we could "create" dynamic properties in $expand by naming a property that didn't already exist and using $compute as:
$expand=newProperty(expandoptions)=$compute(expression)
or as an expand option:
$expand=newProperty($compute(expression);expandoptions)
or
$expand=$compute(expression as newProperty(expandoptions),expression2 as newProperty2(expandoptions))
or???
> introduce $compute query option
> -------------------------------
>
> Key: ODATA-827
> URL: https://issues.oasis-open.org/browse/ODATA-827
> Project: OASIS Open Data Protocol (OData) TC
> Issue Type: Improvement
> Components: OData Protocol, OData URL Conventions
> Affects Versions: V4.0_WD01
> Environment: New Query Capabilities
> Reporter: Andrew Eisenberg
> Labels: GoodIdea, Usability
> Fix For: V4.01_WD01
>
>
> OData could be extended to allow derived computed values to be returned along with the properties of an entity.
> This could be expressed as:
> http://odata.netflix.com/v2/Catalog/Titles?$compute=substring(ShortSynopsis,20) as Summary&$select=Name,Summary
> In ODATA-9 we added support for an equivalent compute transformation in our Data Aggregation Extensions.
--
This message was sent by Atlassian JIRA
(v6.2.2#6258)
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]