Table of Contents

Struct MappedQueryWithTake<T>

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

A fully-configured MappedQuery<T> with a take (and any preceding skip); terminal-only.

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

Type Parameters

T

The type each record is mapped to.

Implements
Inherited Members
Extension Methods

Methods

FirstOrDefault()

Reads the first mapped row.

FirstOrDefaultAsync(CancellationToken)

Asynchronously reads the first mapped row.

Read(Action<IEnumerable<T>>)

Executes the query and passes the mapped rows to handler as they are read.

ReadAsync(Func<IAsyncEnumerable<T>, CancellationToken, ValueTask>, CancellationToken)

Asynchronously executes the query and passes the mapped rows to handler as they are read.

ReadAsync<TResult>(Func<IAsyncEnumerable<T>, CancellationToken, ValueTask<TResult>>, CancellationToken)

Asynchronously executes the query, passes the mapped rows to handler as they are read, and returns the handler's result.

Read<TResult>(Func<IEnumerable<T>, TResult>)

Executes the query, passes the mapped rows to handler as they are read, and returns the handler's result.

SingleOrDefault()

Reads the only mapped row.

SingleOrDefaultAsync(CancellationToken)

Asynchronously reads the only mapped row.

ToArray()

Reads every mapped row into a new array.

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.

ToDictionary<TKey>(Func<T, TKey>, IEqualityComparer<TKey>?)

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

ToHashSet(IEqualityComparer<T>?)

Reads every mapped row into a new HashSet<T>.

ToHashSetAsync(IEqualityComparer<T>?, CancellationToken)

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

ToImmutableArray()

Reads every mapped row into a new ImmutableArray<T>.

ToImmutableArrayAsync(CancellationToken)

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

ToList()

Reads every mapped row into a new List<T>.

ToListAsync(CancellationToken)

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