cursorToken method
Versioned, lossless cursor transport. This is pagination input, not an authorization token. The next query still applies its own WHERE policies.
Implementation
String cursorToken(List<CursorTerm> Function(F) cursor) {
final terms = cursor(queryFields);
_validateCursor(terms.map((t) => t.order).toList());
final payload = {
'version': 1,
'table': queryState.source.schema.identity,
'order': _cursorShape(terms.map((t) => t.order).toList()),
'values': [
for (final term in terms) _encodeCursorValue(term.assignedValue),
],
};
return base64Url.encode(utf8.encode(jsonEncode(payload)));
}