Compartir a través de


2.2.3.6.1.7 Skip System Query Option ($skip)

A data service URI with a $skip system query option identifies a subset of the entities in the collection of entities identified by the resource path section of the URI. That subset is defined by seeking N entities into the collection and selecting only the remaining entities (starting with entity N+1). N is a positive integer specified by this query option.

The value of this query option, referred to as N in the preceding paragraph, MUST be an integer greater than or equal to zero. If a value less than 0 is specified, the URI is considered to be malformed.

If the data service URI contains a $skip query option, but does not contain an $orderby option, 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 for all requests.

The syntax of the skip system query option is defined as follows.

 skipQueryOp = "$skip=" 1*DIGIT

Examples:

 http://host/service.svc/Orders?$order=OrderDate desc&$skip=10

The set of Order entities sorted by ShippedDate (descending), starting with the 11th order.

 http://host/service.svc/Customers('ALFKI')/Orders?$skip=10

The set of Order entity type instances (associated with the Customer entity type instance identified by EntityKey value 'ALFKI') starting with the 11th order.