Table of Contents

Struct MappedQueryWithSkip<T>

Namespace
Open.Database.Extensions
Assembly
Open.Database.Extensions.Core.dll

A MappedQuery<T> with a pending skip; can still be limited with Take(int).

public readonly record struct MappedQueryWithSkip<T> : IMappedQuery<T>, IEquatable<MappedQueryWithSkip<T>>

Type Parameters

T

The type each row is mapped to.

Implements
Inherited Members
Extension Methods

Properties

Command

Gets the command this query reads from.

Methods

AsyncReads()

Reads the rows of an async terminal with ReadAsync instead of Read.

FirstAsync(CancellationToken)

Asynchronously reads the first mapped row; throws if the query returns no rows.

FirstOrDefaultAsync(CancellationToken)

Asynchronously reads the first mapped row.

SingleAsync(CancellationToken)

Asynchronously reads the only mapped row; throws if the query returns no rows or more than one.

SingleOrDefaultAsync(CancellationToken)

Asynchronously reads the only mapped row.

SingleResult()

Stops after the first result set and does not read through the later ones.

Stream(TimeSpan, CancellationToken)

Reads the rows one at a time off the open reader, lazily, as you pull them: on your own thread, with nothing read ahead.

StreamBuffered(TimeSpan, int, CancellationToken)

Reads the rows lazily through a bounded channel that buffers up to bufferSize rows; a size of 0 reads as Stream does, with no channel.

StreamBuffered(TimeSpan, CancellationToken)

Reads the rows lazily through a bounded channel that buffers up to 1,024 rows ahead of your loop, stopping the read when you stop pulling once the buffer is full.

Take(int)

Limits the result to at most count mapped rows.

ToArrayAsync(CancellationToken)

Asynchronously reads every mapped row into a new array.

ToDictionaryAsync<TKey>(Func<T, TKey>, IEqualityComparer<TKey>?, CancellationToken)

Asynchronously reads every mapped row into a new Dictionary<TKey, TValue>, keyed by keySelector.

ToDictionaryAsync<TKey>(Func<T, TKey>, CancellationToken)

Asynchronously reads every mapped row into a new Dictionary<TKey, TValue>, keyed by keySelector.

ToDictionaryAsync<TKey, TValue>(Func<T, TKey>, Func<T, TValue>, IEqualityComparer<TKey>?, CancellationToken)

Asynchronously reads every mapped row into a new Dictionary<TKey, TValue>, keyed by keySelector, with the value valueSelector returns for the row.

ToDictionaryAsync<TKey, TValue>(Func<T, TKey>, Func<T, TValue>, CancellationToken)

Asynchronously reads every mapped row into a new Dictionary<TKey, TValue>, keyed by keySelector, with the value valueSelector returns for the row.

ToHashSetAsync(IEqualityComparer<T>?, CancellationToken)

Asynchronously reads every mapped row into a new HashSet<T>.

ToHashSetAsync(CancellationToken)

Asynchronously reads every mapped row into a new HashSet<T>.

ToImmutableArrayAsync(CancellationToken)

Asynchronously reads every mapped row into a new ImmutableArray<T>.

ToListAsync(CancellationToken)

Asynchronously reads every mapped row into a new List<T>.

ToPooledBuffer(CancellationToken)

Reads every row into pooled arrays and keeps them until the returned buffer is disposed.

ToPooledBufferStream(CancellationToken)

Reads the query in a rolling stream of pooled arrays, once, for one consumer: it buffers the result in pooled arrays (from an array pool), not a channel of rows.

ToPooledStream(CancellationToken)

Reads the query in a rolling stream of pooled arrays, once, and yields the elements one by one: it buffers the result in pooled arrays (from an array pool), not a channel of rows.

UsePool(ArrayPool<T>, bool)

Chooses the pool this query's pooled arrays are rented from, and whether their rows are cleared when they go back.