startAt property

Cursor? startAt
getter/setter pair

A potential prefix of a position in the result set to start the query at.

The ordering of the result set is based on the ORDER BY clause of the original query. SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; This query's results are ordered by (b ASC, __name__ ASC). Cursors can reference either the full ordering or a prefix of the location, though it cannot reference more fields than what are in the provided ORDER BY. Continuing off the example above, attaching the following start cursors will have varying impact: - START BEFORE (2, /k/123): start the query right before a = 1 AND b > 2 AND __name__ > /k/123. - START AFTER (10): start the query right after a = 1 AND b > 10. Unlike OFFSET which requires scanning over the first N results to skip, a start cursor allows the query to begin at a logical position. This position is not required to match an actual result, it will scan forward from this position to find the next document. Requires: * The number of values cannot be greater than the number of fields specified in the ORDER BY clause.

Implementation

Cursor? startAt;