OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [odata-comment] Function invocation in $select


Hi Hans,

 

We’ve considered this early on, see ODATA-9, and decided to defer it to a later version of the specification.

 

In the meantime we’ve used a similar syntax in the OData Extension for Data Aggregation for aggregate expressions, and in fact you could simulate the extended $select syntax sketched in ODATA-9 with the $apply query option:

 

GET Something?$apply=groupby((<list of key properties>),aggregate(<_expression_ 1> with max as alias_1,…,<_expression_ n> with max as alias_n))

 

So extending the $select syntax as sketched in ODATA-9 seems quite natural, but at this point in time we can’t add it to the OASIS standard specification without increasing the protocol version number.

 

Thanks!
--Ralf

 

From: odata-comment@lists.oasis-open.org [mailto:odata-comment@lists.oasis-open.org] On Behalf Of Hans van Bakel
Sent: Donnerstag, 19. März 2015 20:16
To: odata-comment@lists.oasis-open.org
Subject: [odata-comment] Function invocation in $select

 

Hi,

 

I was wondering if there's a specific design decision/reason for not supporting the invocation of functions/actions within the $select parameter while the $orderby and $filter parameters do support invoking an instance function.

 

What I am trying to achieve is to get the result of the invocation of a function as a value in my resultset. So the function gets evaluated for every item in my resultset (just as would happen if I add it to $fitler or $orderby). The name of the property would be the function name for example.

 

Right now I only see the option (in the ABNF) to request the path to the function, there's no way to invoke it. But that would require me to make N+1 queries in order to get the result of the function to my client.

 

Thanks,

Hans



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]