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

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

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


Subject: [OASIS Issue Tracker] (ODATA-820) Allow indexing into collections


     [ https://issues.oasis-open.org/browse/ODATA-820?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Pizzo updated ODATA-820:
--------------------------------

    Proposal: 
*Define new term, "Array", to advertise that a collection of primitive or complex types support indexing: 
             < Term Name="Array" Type="Core.Tag" DefaultValue="true" AppliesTo="Property,ReturnType"> 
                 < Annotation Term="Core.Description" String="Collection members can be referenced by use of a zero-based ordinal index"/> 
             < /Term>
*Term cannot be applied to collections of entities 

*GET/PUT/PATCH/DELETE to the /{index} of an ordered collection of non-entities (Array) retrieves/replaces/modifies/deletes just that item
* /index cannot be appended to collections of entities or non-ordered collections 
* Index is zero-based ordinal and follows JSONPointer syntax: collection/index
* Update section 7.1.5 of the CSDL spec to note that it is possible to have an ordered collection (array) of complex types with navigation properties.


  was:
Define two new terms in the Core vocabulary:

"Array", that can be applied to collections of primitive and complex types to advertise indexability:

<Term Name="Array" Type="Core.Tag" DefaultValue="true" AppliesTo="Property,ReturnType">
<Annotation Term="Core.Description" String="Collection members can be referenced by use of a zero-based ordinal index"/>
</Term>
Arrays can be indexed (GET, PUT, PATCH, DELETE) using zero-based ordinal JSONPointer-style syntax:
- path-to-collection/42

"PositionalInsert" to advertise that a collection supports inserting at a given ordinal

<Term Name="PositionalInsert" Type="Core.Tag" Default="true" AppliesTo="Property, NavigationProperty, EntitySet">
<Annotation Term="Core.Description" String="Items can be inserted at a given ordinal index."/>
</Term>

Arrays support inserting at a position using a new /$index=value syntax.

Remove restriction for navigation properties from indexed collections of complex types in section 7.1.5 of the CSDL spec as we then have canonical URLs for the containing collection item.


> Allow indexing into collections
> -------------------------------
>
>                 Key: ODATA-820
>                 URL: https://issues.oasis-open.org/browse/ODATA-820
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: New Feature
>          Components: OData URL Conventions, Vocabularies
>    Affects Versions: V4.0_ERRATA02
>         Environment: Set Operations, New Query Capabilities
>            Reporter: Ralf Handl
>            Assignee: Ralf Handl
>              Labels: Extension, request_tc_discussion
>             Fix For: V4.01_WD01
>
>
> Allow indexing into collections.
> If servers can guarantee a stable order, they could advertise this via an annotation.
> This could be combined with ETags to identify the state the client is referring to.
> This might be combined with $orderby to let the client choose the order.



--
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]