pub async fn materialize_scan<S: StorageEngine>(
engine: &LiteQueryEngine<S>,
collection: &str,
cursor: &[u8],
count: usize,
) -> Result<QueryResult, LiteError>Expand description
MaterializeScan: cursor-paginated full collection scan for the clone materializer.
Lite is single-node — there is no distributed cursor executor. Instead,
every document in the collection is enumerated in insertion order. When
cursor is non-empty its bytes are interpreted as the UTF-8 ID of the
last-seen document; scanning resumes from the ID that follows it
lexicographically. Returns at most count entries per call. When fewer
than count entries are returned the next-cursor is empty, signalling
scan completion.
The response payload is msgpack-encoded as a 2-element array:
[next_cursor: bin, entries: [[doc_id: str, surrogate: u32, value_bytes: bin], ...]]
packed into QueryResult { columns: ["payload"], rows: [[Value::Bytes(payload)]] }.