Compartir a través de


2.2.3.6.1.9 Skip Token System Query Option ($skiptoken)

The value of a $skiptoken system query option is an opaque token that MUST identify a starting point in the collection of entities identified by the URI containing the $skiptoken parameter. For example, the value of a $skiptoken query option could identify the first entity in a collection, the 3rd entity in a collection containing 10 entities, or any other position within the collection represented by the URI containing the $skiptoken parameter.

Since the value of a $skiptoken query option identifies an index into a collection of entities, a data service URI containing a $skiptoken query option identifies a subset of the entities identified by the resource path section of the URI. The subset identified consists of the entities in the entity set identified by the resource path section of the URI, starting from the first entity at the index identified by the value of the $skiptoken query option through the last entity in the entity set.

If the data service URI contains a $skiptoken query option, but does not contain an $orderby option that identifies a full ordering of the collection of entities identified by the URI, then the entities in the set MUST first be fully ordered by the data service. Such a full order SHOULD be obtained by sorting the entities based on their EntityKey values. While no ordering semantics are mandated, a data service MUST always use the same semantics to obtain a full ordering across different requests on the same entity set. The syntax of the skip token system query option is defined as follows.

 skiptokenQueryOp = "$skiptoken=" 1*pchar

Examples:

 http://host/service.svc/Orders?$orderby=OrderID&$skiptoken=13S35K

A subset of the Order entity instances (sorted by the OrderID property) starting from a position in the collection of all Order entities identified by the skip token parameter.