Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Source/Channel/ChannelPump.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ internal static class ChannelPump
/// <see langword="true"/> to complete the writer when the pass ends,
/// with the exception that ended it if there was one.
/// </param>
/// <param name="cancellationToken">Stops the pass.</param>
/// <include file="../Core/Mapped.docs.xml" path="docs/members[@name='token-pass']/*" />
/// <returns>The number of rows handed to the writer.</returns>
internal static async ValueTask<long> Run<T, TFeed>(
TFeed feed,
Expand Down
16 changes: 8 additions & 8 deletions Source/Channel/ToChannel.Produce.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static partial class ChannelDbExtensions
/// </remarks>
/// <typeparam name="T">The type of each row.</typeparam>
/// <param name="source">The mapped query to read.</param>
/// <param name="cancellationToken">Cancels the read.</param>
/// <include file="../Core/Mapped.docs.xml" path="docs/members[@name='token-read']/*" />
/// <returns>The reader of the new channel.</returns>
/// <exception cref="ArgumentNullException"><paramref name="source"/> is <see langword="null"/>.</exception>
/// <exception cref="OperationCanceledException"><paramref name="cancellationToken"/> is already canceled.</exception>
Expand All @@ -43,7 +43,7 @@ public static ChannelReader<T> ToChannelReader<T>(
/// <see langword="true"/> if at most one consumer reads the channel at a time.
/// </param>
/// <param name="source">The mapped query to read.</param>
/// <param name="cancellationToken">Cancels the read.</param>
/// <include file="../Core/Mapped.docs.xml" path="docs/members[@name='token-read']/*" />
public static ChannelReader<T> ToChannelReader<T>(
this IMappedQuery<T> source,
bool singleReader,
Expand All @@ -61,7 +61,7 @@ public static ChannelReader<T> ToChannelReader<T>(
/// <inheritdoc cref="ToChannelReader{T}(IMappedQuery{T}, CancellationToken)" path="/remarks"/>
/// <typeparam name="T">The type of each row.</typeparam>
/// <param name="source">The mapped query to read.</param>
/// <param name="cancellationToken">Cancels the read.</param>
/// <include file="../Core/Mapped.docs.xml" path="docs/members[@name='token-read']/*" />
/// <returns>The new channel.</returns>
/// <exception cref="ArgumentNullException"><paramref name="source"/> is <see langword="null"/>.</exception>
/// <exception cref="OperationCanceledException"><paramref name="cancellationToken"/> is already canceled.</exception>
Expand All @@ -79,7 +79,7 @@ public static Channel<T> ToChannel<T>(
/// <see langword="true"/> if at most one consumer reads the channel at a time.
/// </param>
/// <param name="source">The mapped query to read.</param>
/// <param name="cancellationToken">Cancels the read.</param>
/// <include file="../Core/Mapped.docs.xml" path="docs/members[@name='token-read']/*" />
public static Channel<T> ToChannel<T>(
this IMappedQuery<T> source,
bool singleReader,
Expand All @@ -97,7 +97,7 @@ public static Channel<T> ToChannel<T>(
/// It faults with the exception that ended the read.
/// </param>
/// <param name="source">The mapped query to read.</param>
/// <param name="cancellationToken">Cancels the read.</param>
/// <include file="../Core/Mapped.docs.xml" path="docs/members[@name='token-read']/*" />
public static Channel<T> ToChannel<T>(
this IMappedQuery<T> source,
out Task<long> readCount,
Expand All @@ -118,7 +118,7 @@ public static Channel<T> ToChannel<T>(
/// channel when the read ends.
/// It faults with the exception that ended the read.
/// </param>
/// <param name="cancellationToken">Cancels the read.</param>
/// <include file="../Core/Mapped.docs.xml" path="docs/members[@name='token-read']/*" />
public static Channel<T> ToChannel<T>(
this IMappedQuery<T> source,
out Task<long> readCount,
Expand Down Expand Up @@ -146,7 +146,7 @@ public static Channel<T> ToChannel<T>(
/// <inheritdoc cref="ToChannelReader{T}(IMappedQuery{T}, CancellationToken)" path="/typeparam"/>
/// <param name="source">The mapped query to read.</param>
/// <param name="capacity">The most rows the channel holds.</param>
/// <param name="cancellationToken">Cancels the read.</param>
/// <include file="../Core/Mapped.docs.xml" path="docs/members[@name='token-read']/*" />
/// <returns>The reader of the new channel.</returns>
/// <exception cref="ArgumentNullException"><paramref name="source"/> is <see langword="null"/>.</exception>
/// <exception cref="ArgumentOutOfRangeException"><paramref name="capacity"/> is less than one.</exception>
Expand All @@ -164,7 +164,7 @@ public static ChannelReader<T> ToBoundedChannelReader<T>(
/// <inheritdoc cref="ToChannelReader{T}(IMappedQuery{T}, CancellationToken)" path="/typeparam"/>
/// <param name="source">The mapped query to read.</param>
/// <param name="capacity">The most rows the channel holds.</param>
/// <param name="cancellationToken">Cancels the read.</param>
/// <include file="../Core/Mapped.docs.xml" path="docs/members[@name='token-read']/*" />
/// <returns>The new channel.</returns>
/// <exception cref="ArgumentNullException"><paramref name="source"/> is <see langword="null"/>.</exception>
/// <exception cref="ArgumentOutOfRangeException"><paramref name="capacity"/> is less than one.</exception>
Expand Down
8 changes: 4 additions & 4 deletions Source/Channel/ToChannel.Streaming.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static partial class ChannelDbExtensions
/// The longest the channel may make no room while the reader is held. Required; passed to <c>Stream</c>.
/// The wait for room before the command runs is not timed.
/// </param>
/// <param name="cancellationToken">Cancels the pass.</param>
/// <include file="../Core/Mapped.docs.xml" path="docs/members[@name='token-pass']/*" />
/// <returns>The number of rows written to the channel.</returns>
/// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="channel"/> is <see langword="null"/>.</exception>
/// <exception cref="ArgumentOutOfRangeException"><paramref name="stallTimeout"/> is zero or negative and not <see cref="Timeout.InfiniteTimeSpan"/>.</exception>
Expand Down Expand Up @@ -55,7 +55,7 @@ public static ValueTask<long> ToChannelHoldingConnection<T>(
/// <param name="channel">The channel to write to.</param>
/// <param name="stallTimeout">The longest the channel may make no room while the reader is held. Required; passed to <c>Stream</c>.
/// The wait for room before the command runs is not timed.</param>
/// <param name="cancellationToken">Cancels the pass.</param>
/// <include file="../Core/Mapped.docs.xml" path="docs/members[@name='token-pass']/*" />
public static ValueTask<long> ToChannelHoldingConnection<T>(
this IMappedQuery<T> source,
Channel<T> channel,
Expand Down Expand Up @@ -87,7 +87,7 @@ public static ValueTask<long> ToChannelHoldingConnection<T>(
/// <param name="source">The mapped query to read.</param>
/// <param name="stallTimeout">The longest the writer may make no room while the reader is held. Required; passed to <c>Stream</c>.
/// The wait for room before the command runs is not timed.</param>
/// <param name="cancellationToken">Cancels the pass.</param>
/// <include file="../Core/Mapped.docs.xml" path="docs/members[@name='token-pass']/*" />
public static ValueTask<long> ToChannelHoldingConnection<T>(
this IMappedQuery<T> source,
ChannelWriter<T> writer,
Expand All @@ -113,7 +113,7 @@ public static ValueTask<long> ToChannelHoldingConnection<T>(
/// <see langword="true"/> to complete the writer when the pass ends,
/// with the exception that ended it if there was one.
/// </param>
/// <param name="cancellationToken">Cancels the pass.</param>
/// <include file="../Core/Mapped.docs.xml" path="docs/members[@name='token-pass']/*" />
public static ValueTask<long> ToChannelHoldingConnection<T>(
this IMappedQuery<T> source,
ChannelWriter<T> writer,
Expand Down
8 changes: 4 additions & 4 deletions Source/Channel/ToChannel.Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static partial class ChannelDbExtensions
/// <typeparam name="T">The type of each row.</typeparam>
/// <param name="source">The mapped query to read.</param>
/// <param name="channel">The channel to write to.</param>
/// <param name="cancellationToken">Cancels the pass.</param>
/// <include file="../Core/Mapped.docs.xml" path="docs/members[@name='token-pass']/*" />
/// <returns>The number of rows written to the channel.</returns>
/// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="channel"/> is <see langword="null"/>.</exception>
/// <exception cref="OperationCanceledException"><paramref name="cancellationToken"/> is already canceled.</exception>
Expand All @@ -58,7 +58,7 @@ public static ValueTask<long> ToChannel<T>(
/// </param>
/// <param name="source">The mapped query to read.</param>
/// <param name="channel">The channel to write to.</param>
/// <param name="cancellationToken">Cancels the pass.</param>
/// <include file="../Core/Mapped.docs.xml" path="docs/members[@name='token-pass']/*" />
public static ValueTask<long> ToChannel<T>(
this IMappedQuery<T> source,
Channel<T> channel,
Expand All @@ -82,7 +82,7 @@ public static ValueTask<long> ToChannel<T>(
/// <inheritdoc cref="ToChannel{T}(IMappedQuery{T}, Channel{T}, CancellationToken)" path="/exception"/>
/// <param name="writer">The writer to write to.</param>
/// <param name="source">The mapped query to read.</param>
/// <param name="cancellationToken">Cancels the pass.</param>
/// <include file="../Core/Mapped.docs.xml" path="docs/members[@name='token-pass']/*" />
public static ValueTask<long> ToChannel<T>(
this IMappedQuery<T> source,
ChannelWriter<T> writer,
Expand All @@ -104,7 +104,7 @@ public static ValueTask<long> ToChannel<T>(
/// <see langword="true"/> to complete the writer when the pass ends,
/// with the exception that ended it if there was one.
/// </param>
/// <param name="cancellationToken">Cancels the pass.</param>
/// <include file="../Core/Mapped.docs.xml" path="docs/members[@name='token-pass']/*" />
public static ValueTask<long> ToChannel<T>(
this IMappedQuery<T> source,
ChannelWriter<T> writer,
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/BoundCall.cs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public static class BoundCallExtensions
/// </remarks>
/// <typeparam name="T">The type of the value.</typeparam>
/// <param name="call">The bound call.</param>
/// <param name="cancellationToken">The token that governs the call.</param>
/// <include file="Mapped.docs.xml" path="docs/members[@name='token-call']/*" />
/// <returns>A task that represents the asynchronous operation; its result is the value.</returns>
/// <exception cref="ValueMappingException">There was no row or the value is NULL and <typeparamref name="T"/> is a non-nullable value type (ask for the nullable type and use <c>??</c> for a default), the value does not convert to <typeparamref name="T"/>, or it is out of its range (the conversion's own error is the inner exception).</exception>
/// <exception cref="InvalidOperationException"><paramref name="call"/> is a <see langword="default"/> value, which is bound to nothing.</exception>
Expand All @@ -275,7 +275,7 @@ public static ValueTask<T> ExecuteScalarAsync<T>(
/// It is not a procedure's return value.
/// </remarks>
/// <param name="call">The bound call.</param>
/// <param name="cancellationToken">The token that governs the call.</param>
/// <include file="Mapped.docs.xml" path="docs/members[@name='token-call']/*" />
/// <returns>A task that represents the asynchronous operation; its result is the number of rows affected.</returns>
/// <exception cref="InvalidOperationException"><paramref name="call"/> is a <see langword="default"/> value, which is bound to nothing.</exception>
/// <exception cref="OperationCanceledException"><paramref name="cancellationToken"/> is canceled.</exception>
Expand Down
12 changes: 6 additions & 6 deletions Source/Core/Core/RowReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ internal static InvalidOperationException NoRows(string terminal)
/// <param name="take">The number of rows to read; 0 reads none.</param>
/// <param name="useReadAsync">See <see cref="ReadRowAsync"/>.</param>
/// <param name="sink">The sink that receives the rows.</param>
/// <param name="cancellationToken">The token that cancels the read.</param>
/// <include file="../Mapped.docs.xml" path="docs/members[@name='token-read']/*" />
/// <param name="abandon">Cancels the command at an early stop, or <see langword="null"/>.</param>
/// <returns>A task whose result is the sink, holding the rows.</returns>
// ref parameters cannot cross an await, so the sink is passed and returned
Expand Down Expand Up @@ -594,7 +594,7 @@ public static async ValueTask<TSink> FillAsync<T, TSink>(
/// <param name="useReadAsync">See <see cref="ReadRowAsync"/>.</param>
/// <param name="build">Makes the result from the chain.</param>
/// <param name="config">The pool and the clearing rule of the chain.</param>
/// <param name="cancellationToken">The token that cancels the read.</param>
/// <include file="../Mapped.docs.xml" path="docs/members[@name='token-read']/*" />
/// <param name="abandon">Cancels the command at an early stop, or <see langword="null"/>.</param>
/// <returns>A task whose result is what <paramref name="build"/> made from the rows.</returns>
// One async method for every collecting terminal (ToList, ToArray,
Expand Down Expand Up @@ -688,7 +688,7 @@ public static async ValueTask<TResult> CollectAsync<T, TBuild, TResult>(
/// <param name="skip">The number of rows to skip.</param>
/// <param name="take">The number of rows the query is limited to; 0 reads none.</param>
/// <param name="useReadAsync">See <see cref="ReadRowAsync"/>.</param>
/// <param name="cancellationToken">The token that cancels the read.</param>
/// <include file="../Mapped.docs.xml" path="docs/members[@name='token-read']/*" />
/// <param name="abandon">Cancels the command at an early stop, or <see langword="null"/>.</param>
/// <returns>A task whose result is <see langword="true"/> if there is a row; otherwise, <see langword="false"/>.</returns>
public static async ValueTask<bool> AnyAsync(
Expand All @@ -712,7 +712,7 @@ public static async ValueTask<bool> AnyAsync(
/// <param name="skip">The number of rows to skip.</param>
/// <param name="take">The most rows to count; 0 reads none, and -1 is no limit.</param>
/// <param name="useReadAsync">See <see cref="ReadRowAsync"/>.</param>
/// <param name="cancellationToken">The token that cancels the read.</param>
/// <include file="../Mapped.docs.xml" path="docs/members[@name='token-read']/*" />
/// <param name="abandon">Cancels the command at the take limit, or <see langword="null"/>.</param>
/// <returns>A task whose result is the number of rows.</returns>
/// <exception cref="OverflowException">There are more than <see cref="int.MaxValue"/> rows.</exception>
Expand Down Expand Up @@ -761,7 +761,7 @@ internal static ValueTask<bool> NextRowAsync(IDataReader reader, bool useReadAsy
/// <param name="useReadAsync">See <see cref="ReadRowAsync"/>.</param>
/// <param name="readThrough"><see langword="true"/> to read through the later result sets once the rows end; otherwise, <see langword="false"/>.</param>
/// <param name="abandon">Cancels the command at an early stop, or <see langword="null"/>.</param>
/// <param name="cancellationToken">The token that cancels the read.</param>
/// <include file="../Mapped.docs.xml" path="docs/members[@name='token-read']/*" />
/// <returns>A lazy asynchronous sequence of the mapped rows.</returns>
public static async IAsyncEnumerable<T> StreamAsync<T>(
IRowSource<T> source, DbDataReader reader, int skip, int take, bool useReadAsync, bool readThrough, ReaderAbandon? abandon = null,
Expand Down Expand Up @@ -842,7 +842,7 @@ static async ValueTask<bool> Core(DbDataReader reader, int skip, bool useReadAsy
/// </remarks>
/// <param name="reader">The reader.</param>
/// <param name="useReadAsync"><see langword="true"/> to read with <c>ReadAsync</c>; otherwise, <see langword="false"/> to read with <c>Read</c>.</param>
/// <param name="cancellationToken">The token that cancels the read.</param>
/// <include file="../Mapped.docs.xml" path="docs/members[@name='token-read']/*" />
/// <returns>A task whose result is <see langword="true"/> if there is a row; otherwise, <see langword="false"/>.</returns>
static ValueTask<bool> ReadRowAsync(DbDataReader reader, bool useReadAsync, CancellationToken cancellationToken)
{
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/DbQueryCall.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ internal object SourceCore
/// The connection, transaction, pool or factory the query is bound to.
/// </summary>
/// <value>The connection, transaction, pool or factory the query was bound to with <c>Using</c>.</value>
/// <exception cref="InvalidOperationException">This is a <see langword="default"/> value, which is bound to nothing.</exception>
/// <include file="Mapped.docs.xml" path="docs/members[@name='default-bound']/*" />
public object Source => SourceCore;

/// <inheritdoc cref="DbQueryUsing.AddParams{T}(T)"/>
Expand Down
8 changes: 4 additions & 4 deletions Source/Core/DbQueryRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public static Lease Open(object source)
/// needs to be.
/// </summary>
/// <param name="source">The connection, transaction, pool or factory.</param>
/// <param name="cancellationToken">The token that governs the call.</param>
/// <include file="Mapped.docs.xml" path="docs/members[@name='token-call']/*" />
/// <returns>A task that represents the asynchronous operation; its result is the lease.</returns>
/// <inheritdoc cref="Open(object)" path="/exception"/>
public static async ValueTask<Lease> OpenAsync(
Expand Down Expand Up @@ -334,7 +334,7 @@ static ProcedureKey KeyOf(DbConnection connection, DbQuery definition)
/// <param name="definition">The query definition.</param>
/// <param name="source">The connection, transaction, pool or factory.</param>
/// <param name="connection">The connection of the run.</param>
/// <param name="cancellationToken">The token that governs the call.</param>
/// <include file="Mapped.docs.xml" path="docs/members[@name='token-call']/*" />
/// <returns>A task that represents the asynchronous operation; its result is the set of names, or <see langword="null"/> when they are not known.</returns>
// Not an async method itself: when the names are remembered (the usual
// case) it finishes without a state machine; only reading them is
Expand Down Expand Up @@ -440,7 +440,7 @@ public static TResult Run<TState, TResult>(
/// <param name="state">The state to pass to <paramref name="transform"/>.</param>
/// <param name="transform">The function that reads the reader.</param>
/// <param name="behavior">The behavior to run the reader with.</param>
/// <param name="cancellationToken">The token that governs the call.</param>
/// <include file="Mapped.docs.xml" path="docs/members[@name='token-call']/*" />
/// <returns>A task that represents the asynchronous operation; its result is the result of <paramref name="transform"/>.</returns>
/// <exception cref="ArgumentNullException"><paramref name="transform"/> is <see langword="null"/>.</exception>
/// <exception cref="OperationCanceledException"><paramref name="cancellationToken"/> is already canceled.</exception>
Expand Down Expand Up @@ -565,7 +565,7 @@ public static ValueTask<int> NonQueryAsync(
/// <param name="call">The bound parameters, or <see langword="default"/> for none.</param>
/// <param name="execute">Runs the command.</param>
/// <param name="convert">Converts what the command returned; it runs with the connection released.</param>
/// <param name="cancellationToken">The token that governs the call.</param>
/// <include file="Mapped.docs.xml" path="docs/members[@name='token-call']/*" />
// One state machine for the whole call.
static async ValueTask<TResult> ExecuteAsync<TValue, TResult>(
DbQuery definition,
Expand Down
Loading