UNPKG

@azure/cosmos

Version:
44 lines 1.47 kB
"use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", { value: true }); exports.createOrderByQueryContinuationToken = createOrderByQueryContinuationToken; exports.serializeOrderByQueryContinuationToken = serializeOrderByQueryContinuationToken; exports.parseOrderByQueryContinuationToken = parseOrderByQueryContinuationToken; /** * Creates an OrderByQueryContinuationToken * @hidden */ function createOrderByQueryContinuationToken(rangeMappings, orderByItems, rid, skipCount, documentRid, offset, limit, hashedLastResult) { if (!rangeMappings || rangeMappings.length === 0) { throw new Error("rangeMappings must contain at least one element"); } if (!orderByItems || orderByItems.length === 0) { throw new Error("orderByItems must contain at least one element"); } return { rangeMappings, orderByItems, rid, skipCount, documentRid, offset, limit, hashedLastResult, }; } /** * Serializes an OrderByQueryContinuationToken to a JSON string * @hidden */ function serializeOrderByQueryContinuationToken(token) { return JSON.stringify(token); } /** * Deserializes a JSON string to an OrderByQueryContinuationToken * @hidden */ function parseOrderByQueryContinuationToken(tokenString) { return JSON.parse(tokenString); } //# sourceMappingURL=OrderByQueryContinuationToken.js.map