IFdbPagedQuery<TResult>
Namespace: FoundationDB.Client · interface
Implements: IFdbRangeQuery, IAsyncQuery<ReadOnlyMemory<TResult>>
Query that will asynchronously stream batches of decoded results from onr or more GetRange operations
Remarks
The results are returned batches of results, as soon as they are received by the client. The size of the batch may vary, and can be controlled by the Streaming option.
Methods
ForEachAsync
Task ForEachAsync(PageAction<TResult> handler)
Executes an action on each pages of key/value pairs in the range results
Task<TAggregate> ForEachAsync<TAggregate>(TAggregate aggregate, PageAggregator<TAggregate, TResult> action)
Executes an action on each pages of key/value pairs in the range results
Reverse
IFdbPagedQuery<TResult> Reverse()
Reverses the order in which the results will be returned
Returns: A new query object that will return the results in reverse order when executed
Calling Reverse on an already reversed query will cancel the effect, and the results will be returned in their natural order.
Select
IFdbPagedQuery<TOther> Select<TOther>(PageFunc<TResult, TOther> lambda)
Projects each element of the range results into a new form.
lambda— Function that is invoked for each source element, and will return the corresponding transformed element.
Returns: New range query that outputs the sequence of transformed elements
query.Select((kv) => $" = ")
ToArrayAsync
Task<TResult[]> ToArrayAsync()
Returns a flattened array with all the elements of the range results
ToListAsync
Task<List<TResult>> ToListAsync()
Returns a flattened list of all the elements of the range results