Cursor
public class Cursor : CustomStringConvertible, JSONRepresentable
The Cursor struct
-
The actual cursor value.
Declaration
Swift
public let value: String
-
Expiration time of value. Some cursors might have expiration time assigned. This is a UTC value after which the cursor is no longer valid and the API starts returning an error. If cursor expires a new one needs to be obtained and pagination needs to be restarted. Some cursors might be short-lived some cursors might be long-lived. This really depends on the sorting type and order, e.g.: 1. on one hand, listing docs created by the user, sorted by the created time ascending will have undefinite expiration because the results cannot change while the iteration is happening. This cursor would be suitable for long term polling. 2. on the other hand, listing docs sorted by the last modified time will have a very short expiration as docs do get modified very often and the modified time can be changed while the iteration is happening thus altering the results.
Declaration
Swift
public let expiration: Date?
-
Declaration
Swift
public var description: String { get }