Skip to content

Commit 3bc51d1

Browse files
Review findings: docs and small fixes (reader-level pipeline overloads move the reader on, the older terminals that still ask for SingleResult, the upgrade count, a constant 0 on the SQL commands, DECLARE variables, the lookup remark, one name-check order)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent 3f7b4e1 commit 3bc51d1

8 files changed

Lines changed: 29 additions & 29 deletions

File tree

‎Source/Core/ProcedureSchemaNames.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Open.Database.Extensions;
88
/// </summary>
99
/// <remarks>
1010
/// "Not known" is an empty or default array: a procedure name with a database part (the lookup would run in the current database), a provider without the collection,
11-
/// a procedure the provider does not list, and a name that exists in more than one schema when none was given. A failure of the lookup itself is thrown as it is.
11+
/// a procedure the provider does not list, and a name that exists in more than one schema when none was given. A failure of the lookup itself is thrown as it is, except that a `NotSupportedException`, a `NotImplementedException` or an `ArgumentException` (and an `InvalidOperationException` that names the collection) is taken as "the provider does not support the collection".
1212
/// </remarks>
1313
static class ProcedureSchemaNames
1414
{

‎Source/Core/RuntimeParamSource.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ sealed class RuntimeParamSource
3636
if (!usable) continue;
3737

3838
Type memberType = member is PropertyInfo p ? p.PropertyType : ((FieldInfo)member).FieldType;
39-
if (!seen.Add(member.Name) || !CanBox(memberType)) continue;
39+
if (!CanBox(memberType) || !seen.Add(member.Name)) continue;
4040

4141
Expression value = Expression.Convert(Expression.MakeMemberAccess(typed, member), typeof(object));
4242
names.Add(member.Name);

‎Source/Dataflow/AsSourceBlock.cs‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ static BufferBlock<T> GetBufferBlock<T>(DataflowBlockOptions? options = null)
1313
/// <summary>
1414
/// Reads an <see cref="IDataReader"/> to the end, posting each record as an array of values to a new <see cref="BufferBlock{T}"/>, and returns the block.
1515
/// </summary>
16-
/// <param name="reader">The data reader to iterate. The caller owns it: it is not closed or disposed here, and it must stay open until the operation completes.</param>
16+
/// <param name="reader">The data reader to iterate. The caller owns it: it is not closed or disposed here, and it must stay open until the operation completes. It is moved on to the next result set once the last row has been read, so that an error that follows the rows is raised.</param>
1717
/// <param name="options">Options for the returned block, such as its bounded capacity, or <see langword="null"/> for the defaults.</param>
1818
/// <returns>The block that receives the records. It is completed after the last record has been delivered, or faulted with the exception that ended the reading.</returns>
1919
/// <remarks>
@@ -35,7 +35,7 @@ public static IReceivableSourceBlock<object[]> AsSourceBlock(this IDataReader re
3535
/// <summary>
3636
/// Reads an <see cref="IDataReader"/> to the end, posting each record as an array of values rented from an array pool to a new <see cref="BufferBlock{T}"/>, and returns the block.
3737
/// </summary>
38-
/// <param name="reader">The data reader to iterate. The caller owns it: it is not closed or disposed here, and it must stay open until the operation completes.</param>
38+
/// <param name="reader">The data reader to iterate. The caller owns it: it is not closed or disposed here, and it must stay open until the operation completes. It is moved on to the next result set once the last row has been read, so that an error that follows the rows is raised.</param>
3939
/// <param name="arrayPool">The array pool to rent each record's array from. The consumer of the records is responsible for returning each array to the pool.</param>
4040
/// <param name="options">Options for the returned block, such as its bounded capacity, or <see langword="null"/> for the defaults.</param>
4141
/// <returns>The block that receives the records. It is completed after the last record has been delivered, or faulted with the exception that ended the reading.</returns>
@@ -61,7 +61,7 @@ public static IReceivableSourceBlock<object[]> AsSourceBlock(this IDataReader re
6161
/// Reads an <see cref="IDataReader"/> to the end, posting each record after it has been transformed by <paramref name="transform"/> to a new <see cref="BufferBlock{T}"/>, and returns the block.
6262
/// </summary>
6363
/// <typeparam name="T">The type of the items delivered to the block: the return type of the transform function.</typeparam>
64-
/// <param name="reader">The data reader to iterate. The caller owns it: it is not closed or disposed here, and it must stay open until the operation completes.</param>
64+
/// <param name="reader">The data reader to iterate. The caller owns it: it is not closed or disposed here, and it must stay open until the operation completes. It is moved on to the next result set once the last row has been read, so that an error that follows the rows is raised.</param>
6565
/// <param name="transform">The function that transforms each <see cref="IDataRecord"/> into the item delivered to the block.</param>
6666
/// <param name="options">Options for the returned block, such as its bounded capacity, or <see langword="null"/> for the defaults.</param>
6767
/// <returns>The block that receives the records. It is completed after the last record has been delivered, or faulted with the exception that ended the reading.</returns>
@@ -87,7 +87,7 @@ public static IReceivableSourceBlock<T> AsSourceBlock<T>(this IDataReader reader
8787
/// Reads an <see cref="IDataReader"/> to the end, posting each record mapped to a new instance of <typeparamref name="T"/> to a new <see cref="BufferBlock{T}"/>, and returns the block.
8888
/// </summary>
8989
/// <typeparam name="T">The type each record is mapped to.</typeparam>
90-
/// <param name="reader">The data reader to iterate. The caller owns it: it is not closed or disposed here, and it must stay open until the operation completes.</param>
90+
/// <param name="reader">The data reader to iterate. The caller owns it: it is not closed or disposed here, and it must stay open until the operation completes. It is moved on to the next result set once the last row has been read, so that an error that follows the rows is raised.</param>
9191
/// <param name="options">Options for the returned block, such as its bounded capacity, or <see langword="null"/> for the defaults.</param>
9292
/// <returns>The block that receives the records. It is completed after the last record has been delivered, or faulted with the exception that ended the reading.</returns>
9393
/// <remarks>
@@ -114,7 +114,7 @@ public static IReceivableSourceBlock<T> AsSourceBlock<T>(this IDataReader reader
114114
/// Reads an <see cref="IDataReader"/> to the end, posting each record mapped to a new instance of <typeparamref name="T"/> by name, or through <paramref name="map"/> when given, to a new <see cref="BufferBlock{T}"/>, and returns the block.
115115
/// </summary>
116116
/// <typeparam name="T">The type each record is mapped to.</typeparam>
117-
/// <param name="reader">The data reader to iterate. The caller owns it: it is not closed or disposed here, and it must stay open until the operation completes.</param>
117+
/// <param name="reader">The data reader to iterate. The caller owns it: it is not closed or disposed here, and it must stay open until the operation completes. It is moved on to the next result set once the last row has been read, so that an error that follows the rows is raised.</param>
118118
/// <param name="map">An optional prebuilt <see cref="RowMap{T}"/>; <see langword="null"/> reads by column name.</param>
119119
/// <param name="options">Options for the returned block, such as its bounded capacity, or <see langword="null"/> for the defaults.</param>
120120
/// <returns>The block that receives the records. It is completed after the last record has been delivered, or faulted with the exception that ended the reading.</returns>
@@ -397,7 +397,7 @@ public static IReceivableSourceBlock<T> AsSourceBlock<T>(this IExecuteReader com
397397
/// <summary>
398398
/// Starts reading an <see cref="IDataReader"/> in the background and returns a new <see cref="BufferBlock{T}"/> that receives each record as an array of values as it is read.
399399
/// </summary>
400-
/// <param name="reader">The data reader to iterate. The caller owns it: it is not closed or disposed here, and it must stay open until the operation completes.</param>
400+
/// <param name="reader">The data reader to iterate. The caller owns it: it is not closed or disposed here, and it must stay open until the operation completes. It is moved on to the next result set once the last row has been read, so that an error that follows the rows is raised.</param>
401401
/// <param name="options">Options for the returned block, such as its bounded capacity, or <see langword="null"/> for the defaults.</param>
402402
/// <param name="cancellationToken">A token that can cancel the reading. The block is then faulted with the resulting exception.</param>
403403
/// <returns>The block that receives the records. It is completed after the last record has been delivered, or faulted with the exception that ended the reading.</returns>
@@ -418,7 +418,7 @@ public static IReceivableSourceBlock<object[]> AsSourceBlockAsync(this IDataRead
418418
/// <summary>
419419
/// Starts reading an <see cref="IDataReader"/> in the background and returns a new <see cref="BufferBlock{T}"/> that receives each record as an array of values rented from an array pool as it is read.
420420
/// </summary>
421-
/// <param name="reader">The data reader to iterate. The caller owns it: it is not closed or disposed here, and it must stay open until the operation completes.</param>
421+
/// <param name="reader">The data reader to iterate. The caller owns it: it is not closed or disposed here, and it must stay open until the operation completes. It is moved on to the next result set once the last row has been read, so that an error that follows the rows is raised.</param>
422422
/// <param name="arrayPool">The array pool to rent each record's array from. The consumer of the records is responsible for returning each array to the pool.</param>
423423
/// <param name="options">Options for the returned block, such as its bounded capacity, or <see langword="null"/> for the defaults.</param>
424424
/// <param name="cancellationToken">A token that can cancel the reading. The block is then faulted with the resulting exception.</param>
@@ -442,7 +442,7 @@ public static IReceivableSourceBlock<object[]> AsSourceBlockAsync(this IDataRead
442442
/// Starts reading an <see cref="IDataReader"/> in the background and returns a new <see cref="BufferBlock{T}"/> that receives each record after it has been transformed by <paramref name="transform"/> as it is read.
443443
/// </summary>
444444
/// <typeparam name="T">The type of the items delivered to the block: the return type of the transform function.</typeparam>
445-
/// <param name="reader">The data reader to iterate. The caller owns it: it is not closed or disposed here, and it must stay open until the operation completes.</param>
445+
/// <param name="reader">The data reader to iterate. The caller owns it: it is not closed or disposed here, and it must stay open until the operation completes. It is moved on to the next result set once the last row has been read, so that an error that follows the rows is raised.</param>
446446
/// <param name="transform">The function that transforms each <see cref="IDataRecord"/> into the item delivered to the block.</param>
447447
/// <param name="options">Options for the returned block, such as its bounded capacity, or <see langword="null"/> for the defaults.</param>
448448
/// <param name="cancellationToken">A token that can cancel the reading. The block is then faulted with the resulting exception.</param>
@@ -466,7 +466,7 @@ public static IReceivableSourceBlock<T> AsSourceBlockAsync<T>(this IDataReader r
466466
/// Starts reading an <see cref="IDataReader"/> in the background and returns a new <see cref="BufferBlock{T}"/> that receives each record mapped to a new instance of <typeparamref name="T"/> as it is read.
467467
/// </summary>
468468
/// <typeparam name="T">The type each record is mapped to.</typeparam>
469-
/// <param name="reader">The data reader to iterate. The caller owns it: it is not closed or disposed here, and it must stay open until the operation completes.</param>
469+
/// <param name="reader">The data reader to iterate. The caller owns it: it is not closed or disposed here, and it must stay open until the operation completes. It is moved on to the next result set once the last row has been read, so that an error that follows the rows is raised.</param>
470470
/// <param name="options">Options for the returned block, such as its bounded capacity, or <see langword="null"/> for the defaults.</param>
471471
/// <param name="cancellationToken">A token that can cancel the reading. The block is then faulted with the resulting exception.</param>
472472
/// <returns>The block that receives the records. It is completed after the last record has been delivered, or faulted with the exception that ended the reading.</returns>
@@ -488,7 +488,7 @@ public static IReceivableSourceBlock<T> AsSourceBlockAsync<T>(this IDataReader r
488488
/// Starts reading an <see cref="IDataReader"/> in the background and returns a new <see cref="BufferBlock{T}"/> that receives each record mapped to a new instance of <typeparamref name="T"/> by name, or through <paramref name="map"/> when given, as it is read.
489489
/// </summary>
490490
/// <typeparam name="T">The type each record is mapped to.</typeparam>
491-
/// <param name="reader">The data reader to iterate. The caller owns it: it is not closed or disposed here, and it must stay open until the operation completes.</param>
491+
/// <param name="reader">The data reader to iterate. The caller owns it: it is not closed or disposed here, and it must stay open until the operation completes. It is moved on to the next result set once the last row has been read, so that an error that follows the rows is raised.</param>
492492
/// <param name="map">An optional prebuilt <see cref="RowMap{T}"/>; <see langword="null"/> reads by column name.</param>
493493
/// <param name="options">Options for the returned block, such as its bounded capacity, or <see langword="null"/> for the defaults.</param>
494494
/// <param name="cancellationToken">A token that can cancel the reading. The block is then faulted with the resulting exception.</param>

0 commit comments

Comments
 (0)