From a32f4e7ac484149e0639d9d76a525dd344beb7b2 Mon Sep 17 00:00:00 2001 From: electricessence <5899455+electricessence@users.noreply.github.com> Date: Fri, 4 Dec 2026 10:52:36 -0800 Subject: [PATCH 1/7] Version 11.0.0-rc.18 The release-candidate suffix moves from rc.17 to rc.18, in the build properties and at the top of the release notes. Co-Authored-By: Claude Sonnet 5.5 --- Source/Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Directory.Build.props b/Source/Directory.Build.props index e7088777..eb7f0907 100644 --- a/Source/Directory.Build.props +++ b/Source/Directory.Build.props @@ -6,7 +6,7 @@ 11.0.0 debug - rc.17 + rc.18 From 7a8341c9a5e6e7c4fa97adfd4e072e7efbdf92e2 Mon Sep 17 00:00:00 2001 From: electricessence <5899455+electricessence@users.noreply.github.com> Date: Fri, 4 Dec 2026 10:52:42 -0800 Subject: [PATCH 2/7] Release notes for rc.18: what changed since rc.17, as a user sees it The "Changes since rc.17" section is brought in line with the code at the cut: each change is one labeled bullet in present tense, with no internal names. - Removed: the protected PrepareCommand(TConnection) and ConnectionProvider of ExpressiveCommandBase, with what a subclass does instead. The migration page lists them with the other removed members. - Changed: the parameter names of a schema-qualified procedure are read once per server and database. The note now says what is shared (also the modes and scales of the output-parameter check), that the bound is 1024 procedures, that a source that reports no server or database is not shared, and what a user must know: every login of the process sees the names, a server is told by the name it reports, test fakes need server names of their own. - Fixed: commands from one factory, pool or function share their names; a parameter ordinal that is not a number; UsingAsync disposes asynchronously; the ParamName of AsGeneric(IDbConnectionPool). - Changed: AddReturnParameter treats a blank name as no name; more exception messages say the fix (blank command, blank parameter name, negative count or index, a type with no public constructor, a mapping with no property name, parameter-name collisions, a name that cannot be derived, a stream enumerated twice); a transaction with no connection is reported before a blank command text. The first line of the release notes names rc.18. Docs only; no code change. Co-Authored-By: Claude Sonnet 5.5 --- docsite/articles/release-notes.md | 10 ++++++---- docsite/articles/whats-new-11.md | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docsite/articles/release-notes.md b/docsite/articles/release-notes.md index 3746d84f..25790597 100644 --- a/docsite/articles/release-notes.md +++ b/docsite/articles/release-notes.md @@ -1,18 +1,20 @@ # Release notes -Version 11 is `11.0.0-rc.17`. For moving a 10.x codebase, read [Coming from earlier versions](whats-new-11.md) first; this page lists each release. +Version 11 is `11.0.0-rc.18`. For moving a 10.x codebase, read [Coming from earlier versions](whats-new-11.md) first; this page lists each release. ## Version 11 release candidates ### Changes since rc.17 -- **Fixed: a command made from a factory, a pool or a function read a procedure's parameter names again for every command.** A command made from a factory or pool that implements only the non-generic interface, or from a `Func` or a `Func` through `Command` or `StoredProcedure`, kept a separate cache per command, so the first run of every command asked the database for the names. Commands made from the same factory, pool or function now share one cache. Different factories, pools and functions still do not share. A function is told apart by the object its method belongs to: lambdas that capture nothing, in one class, are one source and share; a lambda that captures a local variable or a parameter and is built again for each call is a new source each time, so keep one factory for the application. See [Parameter names are read once](expressive-commands.md#parameter-names-are-read-once). +- **Removed: the protected `PrepareCommand(TConnection)` and `ConnectionProvider` of `ExpressiveCommandBase`.** A class of your own that derives from `ExpressiveCommandBase` and called one of them no longer compiles. There is no replacement: a terminal builds the command when it runs, and a subclass that needs the connection, pool or factory keeps its own reference to what it passed to the base constructor. +- **Changed: a procedure with a schema in its name has its parameter names read once per server and database, not once per source of connections.** A command or query of the library's own types that runs on a `DbConnection` which reports both its server (`DataSource`) and its `Database` finds the names of `dbo.get_author` there, whichever connection, factory, pool or transaction it was made from, so a connection created for each call no longer asks the database every time. The names are kept for the life of the process, for connections of one kind of provider (one connection class); up to 1024 procedures are shared, and past that new names stay with their source and nothing is dropped. A name without a schema, an answer of no names, a connection that reports no server or no database, and a command class of your own stay with the source of the connections, as before. The parameter modes and scales that the output-parameter check reads are shared the same way. What to know: every login of the process sees the names (a name that matches no parameter throws with the list of what the procedure declares); a server is told by the name it reports; a test fake that reports a fixed server name shares names with every other such fake, so give each its own name or none; and a failure that forgets the names forgets them for every connection. See [Parameter names are read once](expressive-commands.md#parameter-names-are-read-once). +- **Fixed: a command made from a factory, a pool or a function read a procedure's parameter names again for every command.** A command made from a factory or pool that implements only the non-generic interface, or from a `Func` or a `Func` through `Command` or `StoredProcedure`, kept a separate cache per command, so the first run of every command asked the database for the names. Commands made from the same factory, pool or function now share one cache. Different factories, pools and functions still do not share. A function is told apart by the object its method belongs to: lambdas that capture nothing, in one class, are one source and share; a lambda that captures a local variable or a parameter and is built again for each call is a new source each time, so keep one factory for the application. - **Fixed: a stored procedure's parameter names with an ordinal that is not a number.** A row of the `ProcedureParameters` schema collection whose `ORDINAL_POSITION` is not a number that fits an `int` failed the call that looks up the names; the row is now skipped, and the other parameters are still found. -- **Changed: a procedure with a schema in its name has its parameter names read once per server and database, not once per source of connections.** A command or query of the library's own types that runs on a `DbConnection` which reports its server and its database finds the names of `dbo.get_author` there, whichever connection, factory, pool or transaction it was made from, so a connection created for each call no longer asks the database every time. A name without a schema, an answer of no names, a connection that reports no server or database, and a command class of your own stay with the source of the connections, as before. Up to 1024 procedures are shared; past that, new names stay with their source and nothing is dropped. The parameter modes and scales that the output-parameter check reads are shared the same way. The names are shared by every login of the process: see [Parameter names are read once](expressive-commands.md#parameter-names-are-read-once) for what that means. - **Fixed: `UsingAsync` on a factory or a function disposes the connection asynchronously.** It called `Dispose`; a connection that implements `IAsyncDisposable` (every `DbConnection`) is now disposed with `DisposeAsync`, as the connection scopes do, and any other connection with `Dispose`. - **Changed: `AddReturnParameter` treats a blank name as no name.** The overload that takes a `DbType` (and the SQL Server one that takes a `SqlDbType`) threw `ArgumentException` for an empty or white-space name; like the overload without a type, it now adds an unnamed return parameter, as it does for `null`. - **Fixed: the name of the `ArgumentNullException` from `AsGeneric(IDbConnectionPool)`.** A `null` pool threw with the parameter name `source`; it is now `connectionPool`. -- **Removed: the protected `PrepareCommand(TConnection)` and `ConnectionProvider` of `ExpressiveCommandBase`.** Nothing in the library called either: `PrepareCommand` only forwarded to the private method that builds the command, and `ConnectionProvider` gave back the pool or a provider around the bare connection, which no member read. A class of your own that derives from `ExpressiveCommandBase` and called one of them no longer compiles. There is no replacement: a terminal builds the command when it runs, and a subclass that needs the connection, pool or factory keeps its own reference to what it passed to the base constructor. +- **Changed: more exception messages say what to do.** A blank command (on `CreateCommand` of a connection too), a blank parameter name, a negative count or index, a type with no public constructor given to `Map()`, a mapping with no property name, parameter names that collide, a parameter name that cannot be derived from an argument, and a stream enumerated a second time each name the cause and the fix. +- **Changed: `CreateCommand`, `CreateTextCommand` and `CreateStoredProcedureCommand` on a transaction that has no connection check the connection first.** With a null or blank command text as well, they now throw the `InvalidOperationException` for the missing connection; before, the text was checked first and `ArgumentException` was thrown. ### Changes since rc.16 diff --git a/docsite/articles/whats-new-11.md b/docsite/articles/whats-new-11.md index d9b8fe7e..61d9f679 100644 --- a/docsite/articles/whats-new-11.md +++ b/docsite/articles/whats-new-11.md @@ -165,6 +165,7 @@ Every mapped overload takes one `RowMap? map` where 10.x took key/value pairs ## Removed members - `Concat` (protected) on `ExpressiveCommandBase`: `remaining is null ? [first] : remaining.Prepend(first)`. +- `PrepareCommand(TConnection)` and `ConnectionProvider` (both protected) on `ExpressiveCommandBase`: no replacement; a subclass that needs the connection, pool or factory keeps its own reference to what it passed to the base constructor. - `AddParameterType(IDbCommand, string, SqlDbType)`: call it on the `SqlCommand`. - `QueryResultCollection`: a list holds the same rows. - `reader.AsAsyncEnumerable(n, others...)`: `reader.AsAsyncEnumerable([n, ..others])`. From 62a198873a37f13d90b7a4be2b0e7150c883662a Mon Sep 17 00:00:00 2001 From: electricessence <5899455+electricessence@users.noreply.github.com> Date: Fri, 4 Dec 2026 10:52:42 -0800 Subject: [PATCH 3/7] Public API baseline for rc.18: Unshipped moves to Shipped Every line of PublicAPI.Unshipped.txt of Core and MSSqlClient moves into PublicAPI.Shipped.txt, as in earlier releases: added lines go at the end of Shipped in their order, and each *REMOVED* line deletes the shipped line it names and is not copied. Unshipped keeps only the nullable header. - Core: 925 shipped lines before, 1021 after (130 added, 34 removed). - MSSqlClient: 82 shipped lines before, 80 after (none added, 2 removed). No code change; the analyzer sees the same API, so the build has no RS0016, RS0017, RS0025 or RS0026. Co-Authored-By: Claude Sonnet 5.5 --- Source/Core/PublicAPI.Shipped.txt | 164 ++++++++++++++++----- Source/Core/PublicAPI.Unshipped.txt | 164 --------------------- Source/MSSqlClient/PublicAPI.Shipped.txt | 2 - Source/MSSqlClient/PublicAPI.Unshipped.txt | 2 - 4 files changed, 130 insertions(+), 202 deletions(-) diff --git a/Source/Core/PublicAPI.Shipped.txt b/Source/Core/PublicAPI.Shipped.txt index c4af948d..77162a50 100644 --- a/Source/Core/PublicAPI.Shipped.txt +++ b/Source/Core/PublicAPI.Shipped.txt @@ -21,51 +21,21 @@ Open.Database.Extensions.ExpressiveCommand.ExpressiveCommand(System.Data.IDbTran Open.Database.Extensions.ExpressiveCommand.ExpressiveCommand(System.Func! connFactory, System.Data.CommandType type, string! command, System.Collections.Generic.IEnumerable.Param>? params = null) -> void Open.Database.Extensions.ExpressiveCommandBase Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, System.Data.ParameterDirection direction) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, char value, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, char value, TDbType? type = null, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, int value, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, int value, TDbType? type = null, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, long value, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, long value, TDbType? type = null, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, object? value, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, string? value) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, string? value, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, string? value, TDbType? type = null, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! Open.Database.Extensions.ExpressiveCommandBase.AddParam(T value, string? expression = null) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, T? value, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, T? value, TDbType? type = null, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, System.Data.ParameterDirection direction) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, char value, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, char value, TDbType? type = null, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, int value, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, int value, TDbType? type = null, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, long value, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, long value, TDbType? type = null, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, object? value, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, string? value) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, string? value, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, T value, string? expression = null) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, T? value, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, T? value, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, T? value, TDbType? type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! Open.Database.Extensions.ExpressiveCommandBase.AddParams(T source) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddReturnParam(string! name) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddReturnParam(string! name, TDbType type) -> TThis! Open.Database.Extensions.ExpressiveCommandBase.CancellationToken.get -> System.Threading.CancellationToken Open.Database.Extensions.ExpressiveCommandBase.CancellationToken.set -> void Open.Database.Extensions.ExpressiveCommandBase.Command.get -> string! Open.Database.Extensions.ExpressiveCommandBase.Command.set -> void -Open.Database.Extensions.ExpressiveCommandBase.ConnectionProvider.get -> Open.Database.Extensions.IDbConnectionPool! Open.Database.Extensions.ExpressiveCommandBase.Param -Open.Database.Extensions.ExpressiveCommandBase.Param.Direction.get -> System.Data.ParameterDirection Open.Database.Extensions.ExpressiveCommandBase.Param.Name.get -> string! Open.Database.Extensions.ExpressiveCommandBase.Param.Param() -> void -Open.Database.Extensions.ExpressiveCommandBase.Param.Param(string! name, object? value, TDbType? type = null, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> void Open.Database.Extensions.ExpressiveCommandBase.Param.Type.get -> TDbType? Open.Database.Extensions.ExpressiveCommandBase.Param.Value.get -> object? -Open.Database.Extensions.ExpressiveCommandBase.PrepareCommand(TConnection! connection) -> TCommand! Open.Database.Extensions.ExpressiveCommandBase.SetTimeout(ushort seconds) -> TThis! Open.Database.Extensions.ExpressiveCommandBase.Timeout.get -> ushort Open.Database.Extensions.ExpressiveCommandBase.Timeout.set -> void @@ -463,8 +433,6 @@ Open.Database.Extensions.MappedTable.ToDictionary(System.Func.From(System.Delegate! factory, params System.ReadOnlySpan> pairs) -> Open.Database.Extensions.RowMap! static Open.Database.Extensions.DataReaderExtensions.Select(this System.Data.IDataReader! reader, System.Func! transform, System.Threading.CancellationToken cancellationToken) -> System.Collections.Generic.IEnumerable! static Open.Database.Extensions.DataReaderExtensions.Select(this System.Data.IDataReader! reader, System.Threading.CancellationToken cancellationToken, System.Func! transform) -> System.Collections.Generic.IEnumerable! -Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, object? value, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, object? value, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! Open.Database.Extensions.DbQuery Open.Database.Extensions.DbQuery.Equals(Open.Database.Extensions.DbQuery? other) -> bool Open.Database.Extensions.DbQuery.Params() -> Open.Database.Extensions.DbQuery! @@ -672,8 +640,6 @@ static Open.Database.Extensions.PooledBuffer.From(System.ReadOnlySpan rows static Open.Database.Extensions.PooledBuffer.From(System.ReadOnlySpan rows, System.Buffers.ArrayPool! pool, bool clearOnReturn) -> Open.Database.Extensions.PooledBuffer! static Open.Database.Extensions.Synchronous.SyncCommandExtensions.ExecuteReader(this System.Data.IDbCommand! command, System.Action! handler, System.Data.CommandBehavior behavior = System.Data.CommandBehavior.Default) -> void static Open.Database.Extensions.Synchronous.SyncCommandExtensions.ExecuteReader(this System.Data.IDbCommand! command, System.Func! transform, System.Data.CommandBehavior behavior = System.Data.CommandBehavior.Default) -> T -static Open.Database.Extensions.Synchronous.SyncCommandExtensions.ToDataTable(this System.Data.IDbCommand! command, System.Data.CommandBehavior behavior = System.Data.CommandBehavior.SequentialAccess) -> System.Data.DataTable! -static Open.Database.Extensions.Synchronous.SyncCommandExtensions.ToDataTables(this System.Data.IDbCommand! command, System.Data.CommandBehavior behavior = System.Data.CommandBehavior.SequentialAccess) -> System.Collections.Generic.List! static Open.Database.Extensions.Synchronous.SyncExecuteReaderExtensions.LoadTable(this Open.Database.Extensions.IExecuteReader! command) -> System.Data.DataTable! static Open.Database.Extensions.Synchronous.SyncExecuteReaderExtensions.LoadTables(this Open.Database.Extensions.IExecuteReader! command) -> System.Collections.Generic.List! static Open.Database.Extensions.Synchronous.SyncExpressiveExtensions.Execute(this Open.Database.Extensions.IExecuteCommand! command, System.Action! action) -> void @@ -924,3 +890,133 @@ Open.Database.Extensions.MappedQueryWithTake.CancelOnEarlyStop() -> Open.Data Open.Database.Extensions.MappedCommand.CancelOnEarlyStop() -> Open.Database.Extensions.MappedCommand Open.Database.Extensions.MappedDbQuery.CancelOnEarlyStop() -> Open.Database.Extensions.MappedDbQuery! Open.Database.Extensions.MappedDbQuery.CancelOnEarlyStop() -> Open.Database.Extensions.MappedDbQuery! +Open.Database.Extensions.Generation.GeneratedRowMap +static Open.Database.Extensions.Generation.GeneratedRowMap.Create(System.Func?>! binder) -> Open.Database.Extensions.RowMap! +Open.Database.Extensions.PooledBuffer.AsAsyncEnumerable(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! +Open.Database.Extensions.ExpressiveCommandBase.SequentialAccess() -> TThis! +Open.Database.Extensions.MappedCommand.SequentialAccess() -> Open.Database.Extensions.MappedCommand +Open.Database.Extensions.MappedDbQuery.SequentialAccess() -> Open.Database.Extensions.MappedDbQuery! +Open.Database.Extensions.MappedDbQuery.SequentialAccess() -> Open.Database.Extensions.MappedDbQuery! +Open.Database.Extensions.MappedQuery.SequentialAccess() -> Open.Database.Extensions.MappedQuery +Open.Database.Extensions.MappedQueryWithSkip.SequentialAccess() -> Open.Database.Extensions.MappedQueryWithSkip +Open.Database.Extensions.MappedQueryWithTake.SequentialAccess() -> Open.Database.Extensions.MappedQueryWithTake +static Open.Database.Extensions.Synchronous.SyncCommandExtensions.ToDataTable(this System.Data.IDbCommand! command, System.Data.CommandBehavior behavior = System.Data.CommandBehavior.Default) -> System.Data.DataTable! +static Open.Database.Extensions.Synchronous.SyncCommandExtensions.ToDataTables(this System.Data.IDbCommand! command, System.Data.CommandBehavior behavior = System.Data.CommandBehavior.Default) -> System.Collections.Generic.List! +Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, char value, TDbType type) -> TThis! +Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, char value, TDbType? type = null) -> TThis! +Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, int value, TDbType type) -> TThis! +Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, int value, TDbType? type = null) -> TThis! +Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, long value, TDbType type) -> TThis! +Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, long value, TDbType? type = null) -> TThis! +Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, object? value) -> TThis! +Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, string? value, TDbType type) -> TThis! +Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, string? value, TDbType? type = null) -> TThis! +Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, T? value, TDbType type) -> TThis! +Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, T? value, TDbType? type = null) -> TThis! +Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, char value, TDbType type) -> TThis! +Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, char value, TDbType? type = null) -> TThis! +Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, int value, TDbType type) -> TThis! +Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, int value, TDbType? type = null) -> TThis! +Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, long value, TDbType type) -> TThis! +Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, long value, TDbType? type = null) -> TThis! +Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, object? value) -> TThis! +Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, string? value, TDbType type) -> TThis! +Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, T? value) -> TThis! +Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, T? value, TDbType type) -> TThis! +Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, T? value, TDbType? type) -> TThis! +Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, object? value, TDbType type) -> TThis! +Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, object? value, TDbType type) -> TThis! +Open.Database.Extensions.ExpressiveCommandBase.Param.Param(string! name, object? value, TDbType? type = null) -> void +Open.Database.Extensions.ExpressiveCommandBase.ExecuteOutputAsync(string! name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask +Open.Database.Extensions.ExpressiveCommandBase.ExecuteOutputAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask +Open.Database.Extensions.ExpressiveCommandBase.ExecuteOutputAsync(string! name, byte precision, byte scale, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask +Open.Database.Extensions.ExpressiveCommandBase.ExecuteOutputDecimalAsync(string! name, byte precision, byte scale, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask +Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, TDbType type) -> TThis! +Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, TDbType type) -> TThis! +static Open.Database.Extensions.DataReaderExtensions.ToArrayAsync(this System.Data.Common.DbDataReader! reader, System.Func>! transform, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask +static Open.Database.Extensions.DataReaderExtensions.ToImmutableArrayAsync(this System.Data.Common.DbDataReader! reader, System.Func>! transform, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask> +Open.Database.Extensions.DbCapture +Open.Database.Extensions.DbCapture.DbCapture() -> void +Open.Database.Extensions.DbCapture.AsTask() -> System.Threading.Tasks.Task! +Open.Database.Extensions.DbCapture.ConfigureAwait(bool continueOnCapturedContext) -> Open.Database.Extensions.DbCapture.ConfiguredAwaitable +Open.Database.Extensions.DbCapture.GetAwaiter() -> Open.Database.Extensions.DbCapture.Awaiter +Open.Database.Extensions.DbCapture.Awaiter +Open.Database.Extensions.DbCapture.Awaiter.Awaiter() -> void +Open.Database.Extensions.DbCapture.Awaiter.GetResult() -> T +Open.Database.Extensions.DbCapture.Awaiter.IsCompleted.get -> bool +Open.Database.Extensions.DbCapture.Awaiter.OnCompleted(System.Action! continuation) -> void +Open.Database.Extensions.DbCapture.Awaiter.UnsafeOnCompleted(System.Action! continuation) -> void +Open.Database.Extensions.DbCapture.ConfiguredAwaitable +Open.Database.Extensions.DbCapture.ConfiguredAwaitable.ConfiguredAwaitable() -> void +Open.Database.Extensions.DbCapture.ConfiguredAwaitable.GetAwaiter() -> Open.Database.Extensions.DbCapture.ConfiguredAwaiter +Open.Database.Extensions.DbCapture.ConfiguredAwaiter +Open.Database.Extensions.DbCapture.ConfiguredAwaiter.ConfiguredAwaiter() -> void +Open.Database.Extensions.DbCapture.ConfiguredAwaiter.GetResult() -> T +Open.Database.Extensions.DbCapture.ConfiguredAwaiter.IsCompleted.get -> bool +Open.Database.Extensions.DbCapture.ConfiguredAwaiter.OnCompleted(System.Action! continuation) -> void +Open.Database.Extensions.DbCapture.ConfiguredAwaiter.UnsafeOnCompleted(System.Action! continuation) -> void +Open.Database.Extensions.ExpressiveCommandBase.CaptureReturn(out Open.Database.Extensions.DbCapture returnCode) -> TThis! +Open.Database.Extensions.MappedQuery.CaptureReturn(out Open.Database.Extensions.DbCapture returnCode) -> Open.Database.Extensions.MappedQuery +Open.Database.Extensions.MappedQueryWithSkip.CaptureReturn(out Open.Database.Extensions.DbCapture returnCode) -> Open.Database.Extensions.MappedQueryWithSkip +Open.Database.Extensions.MappedQueryWithTake.CaptureReturn(out Open.Database.Extensions.DbCapture returnCode) -> Open.Database.Extensions.MappedQueryWithTake +Open.Database.Extensions.QueryOptions +Open.Database.Extensions.QueryOptions.AsyncReads = 1 -> Open.Database.Extensions.QueryOptions +Open.Database.Extensions.QueryOptions.CancelOnEarlyStop = 4 -> Open.Database.Extensions.QueryOptions +Open.Database.Extensions.QueryOptions.None = 0 -> Open.Database.Extensions.QueryOptions +Open.Database.Extensions.QueryOptions.SequentialAccess = 8 -> Open.Database.Extensions.QueryOptions +Open.Database.Extensions.QueryOptions.SingleResult = 2 -> Open.Database.Extensions.QueryOptions +Open.Database.Extensions.MappedQuery.WithOptions(Open.Database.Extensions.QueryOptions options) -> Open.Database.Extensions.MappedQuery +Open.Database.Extensions.MappedQueryWithSkip.WithOptions(Open.Database.Extensions.QueryOptions options) -> Open.Database.Extensions.MappedQueryWithSkip +Open.Database.Extensions.MappedQueryWithTake.WithOptions(Open.Database.Extensions.QueryOptions options) -> Open.Database.Extensions.MappedQueryWithTake +Open.Database.Extensions.MappedCommand.WithOptions(Open.Database.Extensions.QueryOptions options) -> Open.Database.Extensions.MappedCommand +Open.Database.Extensions.MappedDbQuery.WithOptions(Open.Database.Extensions.QueryOptions options) -> Open.Database.Extensions.MappedDbQuery! +Open.Database.Extensions.MappedDbQuery.WithOptions(Open.Database.Extensions.QueryOptions options) -> Open.Database.Extensions.MappedDbQuery! +override Open.Database.Extensions.ExpressiveCommand.GetProcedureParameterNamesAsync(System.Data.IDbConnection! connection, string! procedure, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.ValueTask> +Open.Database.Extensions.OutputDbNonQuery +Open.Database.Extensions.OutputDbNonQuery.AddParam(string! name, string? value) -> Open.Database.Extensions.PendingCall> +Open.Database.Extensions.OutputDbNonQuery.AddParam(string! name, TValue value) -> Open.Database.Extensions.PendingCall> +Open.Database.Extensions.OutputDbNonQuery.AddParam(TValue value, string? expression = null) -> Open.Database.Extensions.PendingCall> +Open.Database.Extensions.OutputDbNonQuery.AddParams(TValues values) -> Open.Database.Extensions.PendingCall> +Open.Database.Extensions.OutputDbNonQuery.Params() -> Open.Database.Extensions.OutputDbNonQuery! +Open.Database.Extensions.OutputDbNonQuery.Using(System.Data.Common.DbConnection! connection) -> Open.Database.Extensions.BoundCall> +Open.Database.Extensions.OutputDbNonQuery.Using(System.Data.Common.DbTransaction! transaction) -> Open.Database.Extensions.BoundCall> +Open.Database.Extensions.OutputDbNonQuery.Using(Open.Database.Extensions.IDbConnectionFactory! factory) -> Open.Database.Extensions.BoundCall> +Open.Database.Extensions.OutputDbNonQuery.Using(Open.Database.Extensions.IDbConnectionPool! pool) -> Open.Database.Extensions.BoundCall> +Open.Database.Extensions.OutputDbNonQuery +Open.Database.Extensions.OutputDbNonQuery.AddParams(TParams values) -> Open.Database.Extensions.PendingParams, TParams> +Open.Database.Extensions.OutputDbNonQuery.Using(System.Data.Common.DbConnection! connection) -> Open.Database.Extensions.BoundParams, TParams> +Open.Database.Extensions.OutputDbNonQuery.Using(System.Data.Common.DbTransaction! transaction) -> Open.Database.Extensions.BoundParams, TParams> +Open.Database.Extensions.OutputDbNonQuery.Using(Open.Database.Extensions.IDbConnectionFactory! factory) -> Open.Database.Extensions.BoundParams, TParams> +Open.Database.Extensions.OutputDbNonQuery.Using(Open.Database.Extensions.IDbConnectionPool! pool) -> Open.Database.Extensions.BoundParams, TParams> +Open.Database.Extensions.OutputKind +Open.Database.Extensions.OutputKind.OutputKind() -> void +Open.Database.Extensions.DbNonQuery.Output() -> Open.Database.Extensions.OutputDbNonQuery! +Open.Database.Extensions.DbNonQuery.Output(string! name) -> Open.Database.Extensions.OutputDbNonQuery! +Open.Database.Extensions.DbNonQuery.Output(string! name, byte precision, byte scale) -> Open.Database.Extensions.OutputDbNonQuery! +Open.Database.Extensions.DbNonQuery.OutputDecimal(string! name, byte precision, byte scale) -> Open.Database.Extensions.OutputDbNonQuery! +Open.Database.Extensions.DbNonQuery.Output() -> Open.Database.Extensions.OutputDbNonQuery! +Open.Database.Extensions.DbNonQuery.Output(string! name) -> Open.Database.Extensions.OutputDbNonQuery! +Open.Database.Extensions.DbNonQuery.Output(string! name, byte precision, byte scale) -> Open.Database.Extensions.OutputDbNonQuery! +Open.Database.Extensions.DbNonQuery.OutputDecimal(string! name, byte precision, byte scale) -> Open.Database.Extensions.OutputDbNonQuery! +static Open.Database.Extensions.BoundCallExtensions.ExecuteOutputAsync(this Open.Database.Extensions.BoundCall> call, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask +static Open.Database.Extensions.BoundCallExtensions.ExecuteReturnAsync(this Open.Database.Extensions.BoundCall call, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask +static Open.Database.Extensions.BoundCallExtensions.CaptureOutput(this Open.Database.Extensions.BoundCall call, out Open.Database.Extensions.DbCapture output, string? name = null) -> Open.Database.Extensions.BoundCall +static Open.Database.Extensions.BoundCallExtensions.CaptureOutput(this Open.Database.Extensions.BoundCall call, out Open.Database.Extensions.DbCapture value, byte precision, byte scale, string? name = null) -> Open.Database.Extensions.BoundCall +static Open.Database.Extensions.BoundCallExtensions.CaptureOutputDecimal(this Open.Database.Extensions.BoundCall call, out Open.Database.Extensions.DbCapture value, byte precision, byte scale, string? name = null) -> Open.Database.Extensions.BoundCall +static Open.Database.Extensions.BoundCallExtensions.CaptureReturn(this Open.Database.Extensions.BoundCall call, out Open.Database.Extensions.DbCapture returnCode) -> Open.Database.Extensions.BoundCall +static Open.Database.Extensions.BoundCallExtensions.CaptureOutput(this Open.Database.Extensions.BoundCall> call, out Open.Database.Extensions.DbCapture output, string? name = null) -> Open.Database.Extensions.BoundCall> +static Open.Database.Extensions.BoundCallExtensions.CaptureOutput(this Open.Database.Extensions.BoundCall> call, out Open.Database.Extensions.DbCapture value, byte precision, byte scale, string? name = null) -> Open.Database.Extensions.BoundCall> +static Open.Database.Extensions.BoundCallExtensions.CaptureOutputDecimal(this Open.Database.Extensions.BoundCall> call, out Open.Database.Extensions.DbCapture value, byte precision, byte scale, string? name = null) -> Open.Database.Extensions.BoundCall> +static Open.Database.Extensions.BoundCallExtensions.CaptureReturn(this Open.Database.Extensions.BoundCall> call, out Open.Database.Extensions.DbCapture returnCode) -> Open.Database.Extensions.BoundCall> +Open.Database.Extensions.ExpressiveCommandBase.CaptureOutput(out Open.Database.Extensions.DbCapture output, string? name = null) -> TThis! +Open.Database.Extensions.ExpressiveCommandBase.CaptureOutput(out Open.Database.Extensions.DbCapture value, byte precision, byte scale, string? name = null) -> TThis! +Open.Database.Extensions.ExpressiveCommandBase.CaptureOutputDecimal(out Open.Database.Extensions.DbCapture value, byte precision, byte scale, string? name = null) -> TThis! +Open.Database.Extensions.MappedQuery.CaptureOutput(out Open.Database.Extensions.DbCapture output, string? name = null) -> Open.Database.Extensions.MappedQuery +Open.Database.Extensions.MappedQuery.CaptureOutput(out Open.Database.Extensions.DbCapture value, byte precision, byte scale, string? name = null) -> Open.Database.Extensions.MappedQuery +Open.Database.Extensions.MappedQuery.CaptureOutputDecimal(out Open.Database.Extensions.DbCapture value, byte precision, byte scale, string? name = null) -> Open.Database.Extensions.MappedQuery +Open.Database.Extensions.MappedQueryWithSkip.CaptureOutput(out Open.Database.Extensions.DbCapture output, string? name = null) -> Open.Database.Extensions.MappedQueryWithSkip +Open.Database.Extensions.MappedQueryWithSkip.CaptureOutput(out Open.Database.Extensions.DbCapture value, byte precision, byte scale, string? name = null) -> Open.Database.Extensions.MappedQueryWithSkip +Open.Database.Extensions.MappedQueryWithSkip.CaptureOutputDecimal(out Open.Database.Extensions.DbCapture value, byte precision, byte scale, string? name = null) -> Open.Database.Extensions.MappedQueryWithSkip +Open.Database.Extensions.MappedQueryWithTake.CaptureOutput(out Open.Database.Extensions.DbCapture output, string? name = null) -> Open.Database.Extensions.MappedQueryWithTake +Open.Database.Extensions.MappedQueryWithTake.CaptureOutput(out Open.Database.Extensions.DbCapture value, byte precision, byte scale, string? name = null) -> Open.Database.Extensions.MappedQueryWithTake +Open.Database.Extensions.MappedQueryWithTake.CaptureOutputDecimal(out Open.Database.Extensions.DbCapture value, byte precision, byte scale, string? name = null) -> Open.Database.Extensions.MappedQueryWithTake diff --git a/Source/Core/PublicAPI.Unshipped.txt b/Source/Core/PublicAPI.Unshipped.txt index c198b777..7dc5c581 100644 --- a/Source/Core/PublicAPI.Unshipped.txt +++ b/Source/Core/PublicAPI.Unshipped.txt @@ -1,165 +1 @@ #nullable enable -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.ConnectionProvider.get -> Open.Database.Extensions.IDbConnectionPool! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.PrepareCommand(TConnection! connection) -> TCommand! -Open.Database.Extensions.Generation.GeneratedRowMap -static Open.Database.Extensions.Generation.GeneratedRowMap.Create(System.Func?>! binder) -> Open.Database.Extensions.RowMap! -Open.Database.Extensions.PooledBuffer.AsAsyncEnumerable(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Collections.Generic.IAsyncEnumerable! -Open.Database.Extensions.ExpressiveCommandBase.SequentialAccess() -> TThis! -Open.Database.Extensions.MappedCommand.SequentialAccess() -> Open.Database.Extensions.MappedCommand -Open.Database.Extensions.MappedDbQuery.SequentialAccess() -> Open.Database.Extensions.MappedDbQuery! -Open.Database.Extensions.MappedDbQuery.SequentialAccess() -> Open.Database.Extensions.MappedDbQuery! -Open.Database.Extensions.MappedQuery.SequentialAccess() -> Open.Database.Extensions.MappedQuery -Open.Database.Extensions.MappedQueryWithSkip.SequentialAccess() -> Open.Database.Extensions.MappedQueryWithSkip -Open.Database.Extensions.MappedQueryWithTake.SequentialAccess() -> Open.Database.Extensions.MappedQueryWithTake -*REMOVED*static Open.Database.Extensions.Synchronous.SyncCommandExtensions.ToDataTable(this System.Data.IDbCommand! command, System.Data.CommandBehavior behavior = System.Data.CommandBehavior.SequentialAccess) -> System.Data.DataTable! -static Open.Database.Extensions.Synchronous.SyncCommandExtensions.ToDataTable(this System.Data.IDbCommand! command, System.Data.CommandBehavior behavior = System.Data.CommandBehavior.Default) -> System.Data.DataTable! -*REMOVED*static Open.Database.Extensions.Synchronous.SyncCommandExtensions.ToDataTables(this System.Data.IDbCommand! command, System.Data.CommandBehavior behavior = System.Data.CommandBehavior.SequentialAccess) -> System.Collections.Generic.List! -static Open.Database.Extensions.Synchronous.SyncCommandExtensions.ToDataTables(this System.Data.IDbCommand! command, System.Data.CommandBehavior behavior = System.Data.CommandBehavior.Default) -> System.Collections.Generic.List! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, char value, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, char value, TDbType type) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, char value, TDbType? type = null, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, char value, TDbType? type = null) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, int value, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, int value, TDbType type) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, int value, TDbType? type = null, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, int value, TDbType? type = null) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, long value, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, long value, TDbType type) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, long value, TDbType? type = null, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, long value, TDbType? type = null) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, object? value, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, object? value) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, string? value, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, string? value, TDbType type) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, string? value, TDbType? type = null, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, string? value, TDbType? type = null) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, T? value, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, T? value, TDbType type) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, T? value, TDbType? type = null, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, T? value, TDbType? type = null) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, char value, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, char value, TDbType type) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, char value, TDbType? type = null, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, char value, TDbType? type = null) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, int value, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, int value, TDbType type) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, int value, TDbType? type = null, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, int value, TDbType? type = null) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, long value, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, long value, TDbType type) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, long value, TDbType? type = null, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, long value, TDbType? type = null) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, object? value, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, object? value) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, string? value, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, string? value, TDbType type) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, T? value, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, T? value) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, T? value, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, T? value, TDbType type) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, T? value, TDbType? type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, T? value, TDbType? type) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddReturnParam(string! name) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddReturnParam(string! name, TDbType type) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, object? value, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, object? value, TDbType type) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, object? value, TDbType type, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, object? value, TDbType type) -> TThis! -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.Param.Direction.get -> System.Data.ParameterDirection -*REMOVED*Open.Database.Extensions.ExpressiveCommandBase.Param.Param(string! name, object? value, TDbType? type = null, System.Data.ParameterDirection direction = System.Data.ParameterDirection.Input) -> void -Open.Database.Extensions.ExpressiveCommandBase.Param.Param(string! name, object? value, TDbType? type = null) -> void -Open.Database.Extensions.ExpressiveCommandBase.ExecuteOutputAsync(string! name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask -Open.Database.Extensions.ExpressiveCommandBase.ExecuteOutputAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask -Open.Database.Extensions.ExpressiveCommandBase.ExecuteOutputAsync(string! name, byte precision, byte scale, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask -Open.Database.Extensions.ExpressiveCommandBase.ExecuteOutputDecimalAsync(string! name, byte precision, byte scale, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask -Open.Database.Extensions.ExpressiveCommandBase.AddParam(string! name, TDbType type) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.AddParamIf(bool condition, string! name, TDbType type) -> TThis! -static Open.Database.Extensions.DataReaderExtensions.ToArrayAsync(this System.Data.Common.DbDataReader! reader, System.Func>! transform, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask -static Open.Database.Extensions.DataReaderExtensions.ToImmutableArrayAsync(this System.Data.Common.DbDataReader! reader, System.Func>! transform, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask> -Open.Database.Extensions.DbCapture -Open.Database.Extensions.DbCapture.DbCapture() -> void -Open.Database.Extensions.DbCapture.AsTask() -> System.Threading.Tasks.Task! -Open.Database.Extensions.DbCapture.ConfigureAwait(bool continueOnCapturedContext) -> Open.Database.Extensions.DbCapture.ConfiguredAwaitable -Open.Database.Extensions.DbCapture.GetAwaiter() -> Open.Database.Extensions.DbCapture.Awaiter -Open.Database.Extensions.DbCapture.Awaiter -Open.Database.Extensions.DbCapture.Awaiter.Awaiter() -> void -Open.Database.Extensions.DbCapture.Awaiter.GetResult() -> T -Open.Database.Extensions.DbCapture.Awaiter.IsCompleted.get -> bool -Open.Database.Extensions.DbCapture.Awaiter.OnCompleted(System.Action! continuation) -> void -Open.Database.Extensions.DbCapture.Awaiter.UnsafeOnCompleted(System.Action! continuation) -> void -Open.Database.Extensions.DbCapture.ConfiguredAwaitable -Open.Database.Extensions.DbCapture.ConfiguredAwaitable.ConfiguredAwaitable() -> void -Open.Database.Extensions.DbCapture.ConfiguredAwaitable.GetAwaiter() -> Open.Database.Extensions.DbCapture.ConfiguredAwaiter -Open.Database.Extensions.DbCapture.ConfiguredAwaiter -Open.Database.Extensions.DbCapture.ConfiguredAwaiter.ConfiguredAwaiter() -> void -Open.Database.Extensions.DbCapture.ConfiguredAwaiter.GetResult() -> T -Open.Database.Extensions.DbCapture.ConfiguredAwaiter.IsCompleted.get -> bool -Open.Database.Extensions.DbCapture.ConfiguredAwaiter.OnCompleted(System.Action! continuation) -> void -Open.Database.Extensions.DbCapture.ConfiguredAwaiter.UnsafeOnCompleted(System.Action! continuation) -> void -Open.Database.Extensions.ExpressiveCommandBase.CaptureReturn(out Open.Database.Extensions.DbCapture returnCode) -> TThis! -Open.Database.Extensions.MappedQuery.CaptureReturn(out Open.Database.Extensions.DbCapture returnCode) -> Open.Database.Extensions.MappedQuery -Open.Database.Extensions.MappedQueryWithSkip.CaptureReturn(out Open.Database.Extensions.DbCapture returnCode) -> Open.Database.Extensions.MappedQueryWithSkip -Open.Database.Extensions.MappedQueryWithTake.CaptureReturn(out Open.Database.Extensions.DbCapture returnCode) -> Open.Database.Extensions.MappedQueryWithTake -Open.Database.Extensions.QueryOptions -Open.Database.Extensions.QueryOptions.AsyncReads = 1 -> Open.Database.Extensions.QueryOptions -Open.Database.Extensions.QueryOptions.CancelOnEarlyStop = 4 -> Open.Database.Extensions.QueryOptions -Open.Database.Extensions.QueryOptions.None = 0 -> Open.Database.Extensions.QueryOptions -Open.Database.Extensions.QueryOptions.SequentialAccess = 8 -> Open.Database.Extensions.QueryOptions -Open.Database.Extensions.QueryOptions.SingleResult = 2 -> Open.Database.Extensions.QueryOptions -Open.Database.Extensions.MappedQuery.WithOptions(Open.Database.Extensions.QueryOptions options) -> Open.Database.Extensions.MappedQuery -Open.Database.Extensions.MappedQueryWithSkip.WithOptions(Open.Database.Extensions.QueryOptions options) -> Open.Database.Extensions.MappedQueryWithSkip -Open.Database.Extensions.MappedQueryWithTake.WithOptions(Open.Database.Extensions.QueryOptions options) -> Open.Database.Extensions.MappedQueryWithTake -Open.Database.Extensions.MappedCommand.WithOptions(Open.Database.Extensions.QueryOptions options) -> Open.Database.Extensions.MappedCommand -Open.Database.Extensions.MappedDbQuery.WithOptions(Open.Database.Extensions.QueryOptions options) -> Open.Database.Extensions.MappedDbQuery! -Open.Database.Extensions.MappedDbQuery.WithOptions(Open.Database.Extensions.QueryOptions options) -> Open.Database.Extensions.MappedDbQuery! -override Open.Database.Extensions.ExpressiveCommand.GetProcedureParameterNamesAsync(System.Data.IDbConnection! connection, string! procedure, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.ValueTask> -Open.Database.Extensions.OutputDbNonQuery -Open.Database.Extensions.OutputDbNonQuery.AddParam(string! name, string? value) -> Open.Database.Extensions.PendingCall> -Open.Database.Extensions.OutputDbNonQuery.AddParam(string! name, TValue value) -> Open.Database.Extensions.PendingCall> -Open.Database.Extensions.OutputDbNonQuery.AddParam(TValue value, string? expression = null) -> Open.Database.Extensions.PendingCall> -Open.Database.Extensions.OutputDbNonQuery.AddParams(TValues values) -> Open.Database.Extensions.PendingCall> -Open.Database.Extensions.OutputDbNonQuery.Params() -> Open.Database.Extensions.OutputDbNonQuery! -Open.Database.Extensions.OutputDbNonQuery.Using(System.Data.Common.DbConnection! connection) -> Open.Database.Extensions.BoundCall> -Open.Database.Extensions.OutputDbNonQuery.Using(System.Data.Common.DbTransaction! transaction) -> Open.Database.Extensions.BoundCall> -Open.Database.Extensions.OutputDbNonQuery.Using(Open.Database.Extensions.IDbConnectionFactory! factory) -> Open.Database.Extensions.BoundCall> -Open.Database.Extensions.OutputDbNonQuery.Using(Open.Database.Extensions.IDbConnectionPool! pool) -> Open.Database.Extensions.BoundCall> -Open.Database.Extensions.OutputDbNonQuery -Open.Database.Extensions.OutputDbNonQuery.AddParams(TParams values) -> Open.Database.Extensions.PendingParams, TParams> -Open.Database.Extensions.OutputDbNonQuery.Using(System.Data.Common.DbConnection! connection) -> Open.Database.Extensions.BoundParams, TParams> -Open.Database.Extensions.OutputDbNonQuery.Using(System.Data.Common.DbTransaction! transaction) -> Open.Database.Extensions.BoundParams, TParams> -Open.Database.Extensions.OutputDbNonQuery.Using(Open.Database.Extensions.IDbConnectionFactory! factory) -> Open.Database.Extensions.BoundParams, TParams> -Open.Database.Extensions.OutputDbNonQuery.Using(Open.Database.Extensions.IDbConnectionPool! pool) -> Open.Database.Extensions.BoundParams, TParams> -Open.Database.Extensions.OutputKind -Open.Database.Extensions.OutputKind.OutputKind() -> void -Open.Database.Extensions.DbNonQuery.Output() -> Open.Database.Extensions.OutputDbNonQuery! -Open.Database.Extensions.DbNonQuery.Output(string! name) -> Open.Database.Extensions.OutputDbNonQuery! -Open.Database.Extensions.DbNonQuery.Output(string! name, byte precision, byte scale) -> Open.Database.Extensions.OutputDbNonQuery! -Open.Database.Extensions.DbNonQuery.OutputDecimal(string! name, byte precision, byte scale) -> Open.Database.Extensions.OutputDbNonQuery! -Open.Database.Extensions.DbNonQuery.Output() -> Open.Database.Extensions.OutputDbNonQuery! -Open.Database.Extensions.DbNonQuery.Output(string! name) -> Open.Database.Extensions.OutputDbNonQuery! -Open.Database.Extensions.DbNonQuery.Output(string! name, byte precision, byte scale) -> Open.Database.Extensions.OutputDbNonQuery! -Open.Database.Extensions.DbNonQuery.OutputDecimal(string! name, byte precision, byte scale) -> Open.Database.Extensions.OutputDbNonQuery! -static Open.Database.Extensions.BoundCallExtensions.ExecuteOutputAsync(this Open.Database.Extensions.BoundCall> call, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask -static Open.Database.Extensions.BoundCallExtensions.ExecuteReturnAsync(this Open.Database.Extensions.BoundCall call, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask -static Open.Database.Extensions.BoundCallExtensions.CaptureOutput(this Open.Database.Extensions.BoundCall call, out Open.Database.Extensions.DbCapture output, string? name = null) -> Open.Database.Extensions.BoundCall -static Open.Database.Extensions.BoundCallExtensions.CaptureOutput(this Open.Database.Extensions.BoundCall call, out Open.Database.Extensions.DbCapture value, byte precision, byte scale, string? name = null) -> Open.Database.Extensions.BoundCall -static Open.Database.Extensions.BoundCallExtensions.CaptureOutputDecimal(this Open.Database.Extensions.BoundCall call, out Open.Database.Extensions.DbCapture value, byte precision, byte scale, string? name = null) -> Open.Database.Extensions.BoundCall -static Open.Database.Extensions.BoundCallExtensions.CaptureReturn(this Open.Database.Extensions.BoundCall call, out Open.Database.Extensions.DbCapture returnCode) -> Open.Database.Extensions.BoundCall -static Open.Database.Extensions.BoundCallExtensions.CaptureOutput(this Open.Database.Extensions.BoundCall> call, out Open.Database.Extensions.DbCapture output, string? name = null) -> Open.Database.Extensions.BoundCall> -static Open.Database.Extensions.BoundCallExtensions.CaptureOutput(this Open.Database.Extensions.BoundCall> call, out Open.Database.Extensions.DbCapture value, byte precision, byte scale, string? name = null) -> Open.Database.Extensions.BoundCall> -static Open.Database.Extensions.BoundCallExtensions.CaptureOutputDecimal(this Open.Database.Extensions.BoundCall> call, out Open.Database.Extensions.DbCapture value, byte precision, byte scale, string? name = null) -> Open.Database.Extensions.BoundCall> -static Open.Database.Extensions.BoundCallExtensions.CaptureReturn(this Open.Database.Extensions.BoundCall> call, out Open.Database.Extensions.DbCapture returnCode) -> Open.Database.Extensions.BoundCall> -Open.Database.Extensions.ExpressiveCommandBase.CaptureOutput(out Open.Database.Extensions.DbCapture output, string? name = null) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.CaptureOutput(out Open.Database.Extensions.DbCapture value, byte precision, byte scale, string? name = null) -> TThis! -Open.Database.Extensions.ExpressiveCommandBase.CaptureOutputDecimal(out Open.Database.Extensions.DbCapture value, byte precision, byte scale, string? name = null) -> TThis! -Open.Database.Extensions.MappedQuery.CaptureOutput(out Open.Database.Extensions.DbCapture output, string? name = null) -> Open.Database.Extensions.MappedQuery -Open.Database.Extensions.MappedQuery.CaptureOutput(out Open.Database.Extensions.DbCapture value, byte precision, byte scale, string? name = null) -> Open.Database.Extensions.MappedQuery -Open.Database.Extensions.MappedQuery.CaptureOutputDecimal(out Open.Database.Extensions.DbCapture value, byte precision, byte scale, string? name = null) -> Open.Database.Extensions.MappedQuery -Open.Database.Extensions.MappedQueryWithSkip.CaptureOutput(out Open.Database.Extensions.DbCapture output, string? name = null) -> Open.Database.Extensions.MappedQueryWithSkip -Open.Database.Extensions.MappedQueryWithSkip.CaptureOutput(out Open.Database.Extensions.DbCapture value, byte precision, byte scale, string? name = null) -> Open.Database.Extensions.MappedQueryWithSkip -Open.Database.Extensions.MappedQueryWithSkip.CaptureOutputDecimal(out Open.Database.Extensions.DbCapture value, byte precision, byte scale, string? name = null) -> Open.Database.Extensions.MappedQueryWithSkip -Open.Database.Extensions.MappedQueryWithTake.CaptureOutput(out Open.Database.Extensions.DbCapture output, string? name = null) -> Open.Database.Extensions.MappedQueryWithTake -Open.Database.Extensions.MappedQueryWithTake.CaptureOutput(out Open.Database.Extensions.DbCapture value, byte precision, byte scale, string? name = null) -> Open.Database.Extensions.MappedQueryWithTake -Open.Database.Extensions.MappedQueryWithTake.CaptureOutputDecimal(out Open.Database.Extensions.DbCapture value, byte precision, byte scale, string? name = null) -> Open.Database.Extensions.MappedQueryWithTake diff --git a/Source/MSSqlClient/PublicAPI.Shipped.txt b/Source/MSSqlClient/PublicAPI.Shipped.txt index c55be950..4c30db61 100644 --- a/Source/MSSqlClient/PublicAPI.Shipped.txt +++ b/Source/MSSqlClient/PublicAPI.Shipped.txt @@ -1,7 +1,5 @@ #nullable enable Open.Database.Extensions.ExpressiveSqlCommand -Open.Database.Extensions.ExpressiveSqlCommand.AddParam(string! name, System.Data.DbType type, System.Data.ParameterDirection direction) -> Open.Database.Extensions.ExpressiveSqlCommand! -Open.Database.Extensions.ExpressiveSqlCommand.AddParamIf(bool condition, string! name, System.Data.DbType type, System.Data.ParameterDirection direction) -> Open.Database.Extensions.ExpressiveSqlCommand! Open.Database.Extensions.ExpressiveSqlCommand.ExpressiveSqlCommand(Microsoft.Data.SqlClient.SqlConnection! connection, System.Data.CommandType type, string! command, System.Collections.Generic.IEnumerable.Param>? params = null) -> void Open.Database.Extensions.ExpressiveSqlCommand.ExpressiveSqlCommand(Microsoft.Data.SqlClient.SqlConnection! connection, System.Data.IDbTransaction? transaction, System.Data.CommandType type, string! command, System.Collections.Generic.IEnumerable.Param>? params = null) -> void Open.Database.Extensions.ExpressiveSqlCommand.ExpressiveSqlCommand(Open.Database.Extensions.IDbConnectionFactory! connFactory, System.Data.CommandType type, string! command, System.Collections.Generic.IEnumerable.Param>? params = null) -> void diff --git a/Source/MSSqlClient/PublicAPI.Unshipped.txt b/Source/MSSqlClient/PublicAPI.Unshipped.txt index 2d00ef13..7dc5c581 100644 --- a/Source/MSSqlClient/PublicAPI.Unshipped.txt +++ b/Source/MSSqlClient/PublicAPI.Unshipped.txt @@ -1,3 +1 @@ #nullable enable -*REMOVED*Open.Database.Extensions.ExpressiveSqlCommand.AddParam(string! name, System.Data.DbType type, System.Data.ParameterDirection direction) -> Open.Database.Extensions.ExpressiveSqlCommand! -*REMOVED*Open.Database.Extensions.ExpressiveSqlCommand.AddParamIf(bool condition, string! name, System.Data.DbType type, System.Data.ParameterDirection direction) -> Open.Database.Extensions.ExpressiveSqlCommand! From b270cbc82f532e6ede971c5a92d49b3dac2e72ad Mon Sep 17 00:00:00 2001 From: electricessence <5899455+electricessence@users.noreply.github.com> Date: Fri, 4 Dec 2026 11:14:06 -0800 Subject: [PATCH 4/7] Say "It declares" in the ambiguity message of a text command, not "The procedure declares" ParameterNameMessages.Ambiguous wrote "The procedure declares" whatever the command was, so an ambiguous parameter name in a SQL text read as if the text were a procedure. Ambiguous now takes the words before the declared names, as NoMatch does, and the match passes them down: a stored procedure keeps "The procedure declares", a text command and a DbQuery definition (as in its no-match message) say "It declares". The message of a stored procedure is word for word as before. SqlTextDerivedNamesTests pins the text-command message. Co-Authored-By: Claude Sonnet 5.5 --- Source/Core/Core/ParameterNameMessages.cs | 15 ++++++++++++--- Source/Core/DbQueryBinding.cs | 17 +++++++++++++---- Source/Core/ExpressiveCommandBase.cs | 7 ++++++- Source/Core/NameSet.cs | 11 +++++++++-- Source/Core/ParameterNames.cs | 11 +++++++---- Source/Core/TextNameCache.cs | 3 ++- .../AllocationQuickWinTests.cs | 6 +++--- .../DerivedNameCostTests.cs | 1 + .../ParameterNameAddParamsTests.cs | 7 ++++--- .../SqlTextDerivedNamesTests.cs | 7 +++++++ 10 files changed, 64 insertions(+), 21 deletions(-) diff --git a/Source/Core/Core/ParameterNameMessages.cs b/Source/Core/Core/ParameterNameMessages.cs index 68e06886..20c76f98 100644 --- a/Source/Core/Core/ParameterNameMessages.cs +++ b/Source/Core/Core/ParameterNameMessages.cs @@ -23,6 +23,13 @@ public const string NullOnlyForReturn public const string ProcedureDeclares = "The procedure declares"; + /// + /// The words before the names that a command or a query declares, when + /// it is not said to be a procedure. + /// + public const string ItDeclares + = "It declares"; + /// /// The call that names a parameter, as the fix of a message writes it. /// @@ -189,10 +196,11 @@ public static string NameWithColumn(string subject) /// What was written, as the message starts. /// The first parameter it fits. /// The second parameter it fits. - /// The procedure. + /// The procedure or the command text. /// The candidate name that fits both. /// How the candidate fits them. - /// The parameters the procedure declares. + /// The words before the declared names. + /// The parameters the owner declares. /// What to do. /// The message. public static string Ambiguous( @@ -202,11 +210,12 @@ public static string Ambiguous( string procedure, string candidate, string tier, + string declares, string declared, string fix) => $"{subject} matches both '{first}' and '{second}' of '{procedure}'. " + $"Its candidate name '{candidate}' fits each of them {tier}. " - + $"The procedure declares: {declared}. {fix}"; + + $"{declares}: {declared}. {fix}"; /// An argument fits none of the parameters. /// The text of the argument. diff --git a/Source/Core/DbQueryBinding.cs b/Source/Core/DbQueryBinding.cs index dfbbb923..6d235f42 100644 --- a/Source/Core/DbQueryBinding.cs +++ b/Source/Core/DbQueryBinding.cs @@ -44,10 +44,13 @@ public static string ResolveDerived( ParameterNames.DerivedExpression.Resolution? last = derived.Last; if (last is null || !ReferenceEquals(last.Names, names)) { - string real = names!.Match(derived.Expression, definition.CommandText) + string real = names!.Match( + derived.Expression, + definition.CommandText, + declares: ParameterNameMessages.ItDeclares) ?? throw NoMatch( derived.Expression, definition.CommandText, - "It declares", names!.Names); + ParameterNameMessages.ItDeclares, names!.Names); last = new(names!, real, names!.Find(real)); derived.Last = last; } @@ -119,7 +122,10 @@ var members for (int i = 0; i < members.Names.Length; i++) { string? name = known - ? names!.Match(members.Names[i], definition.CommandText) + ? names!.Match( + members.Names[i], + definition.CommandText, + declares: ParameterNameMessages.ItDeclares) : members.Names[i]; if (name is null || whole.Claims(name, names, definition)) continue; @@ -182,7 +188,10 @@ static DbQuery.MemberMatch Resolved( var entries = new NameSet.Entry?[members.Length]; for (int i = 0; i < members.Length; i++) { - resolved[i] = names.Match(members[i], definition.CommandText); + resolved[i] = names.Match( + members[i], + definition.CommandText, + declares: ParameterNameMessages.ItDeclares); if (resolved[i] is { } real) entries[i] = names.Find(real); } diff --git a/Source/Core/ExpressiveCommandBase.cs b/Source/Core/ExpressiveCommandBase.cs index d87605ad..18d371b4 100644 --- a/Source/Core/ExpressiveCommandBase.cs +++ b/Source/Core/ExpressiveCommandBase.cs @@ -1157,7 +1157,12 @@ void Apply( ? p.Name : scan ? TextNameCache.Scan(Command, expression) - : real!.Match(expression, Command); + : real!.Match( + expression, + Command, + declares: Type == CommandType.Text + ? ParameterNameMessages.ItDeclares + : ParameterNameMessages.ProcedureDeclares); if (name is null) { // A member of an object that the procedure does not take is simply not sent; an argument named by the caller must match. diff --git a/Source/Core/NameSet.cs b/Source/Core/NameSet.cs index 35ac64b3..ce88a6b4 100644 --- a/Source/Core/NameSet.cs +++ b/Source/Core/NameSet.cs @@ -185,10 +185,15 @@ Dictionary BuildEntries() /// The text of the argument, or the name of a member of an AddParams object. /// The procedure's name or the command text, for the message of an ambiguity. /// What matches, for the message of an ambiguity; names the argument. + /// The words before the declared names in the message of an ambiguity. /// The real name, or when the expression matches none. /// The expression is not derivable. /// The expression fits more than one name equally well. - public string? Match(string expression, string procedure, string? subject = null) + public string? Match( + string expression, + string procedure, + string? subject = null, + string declares = ParameterNameMessages.ProcedureDeclares) { if (_matches.TryGetValue(expression, out string? remembered)) return remembered; @@ -196,7 +201,9 @@ Dictionary BuildEntries() ImmutableArray candidates = ParameterNames.Describe(expression)?.Candidates ?? ParameterNames.Candidates(expression); // Two threads may both match and store: the answer is the same. - string? found = ParameterNames.MatchBareAs(candidates, Names, BareNames, expression, procedure, subject); + string? found = ParameterNames.MatchBareAs( + candidates, Names, BareNames, expression, procedure, subject, + declares: declares); if (_matches.Count < MaxMatches) _matches[expression] = found; return found; diff --git a/Source/Core/ParameterNames.cs b/Source/Core/ParameterNames.cs index 48c3b9d8..f6a2a902 100644 --- a/Source/Core/ParameterNames.cs +++ b/Source/Core/ParameterNames.cs @@ -304,6 +304,7 @@ static bool ClosesAt(string s, int open, int close) /// The procedure's name, for the message of an ambiguity. /// What matches, for the message of an ambiguity; names the argument. /// What to do about an ambiguity, ending its message; advises [Column] on the subject, or an explicit AddParam name. + /// The words before the declared names in the message of an ambiguity. internal static string? MatchBareAs( ImmutableArray candidates, ImmutableArray parameterNames, @@ -311,11 +312,12 @@ static bool ClosesAt(string s, int open, int close) string expression, string procedure, string? subject, - string? fix = null) + string? fix = null, + string declares = ParameterNameMessages.ProcedureDeclares) { foreach (string candidate in candidates) { - if (Find(expression, procedure, candidate, parameterNames, bareNames, subject, fix) is { } found) return found; + if (Find(expression, procedure, candidate, parameterNames, bareNames, subject, fix, declares) is { } found) return found; } return null; @@ -335,7 +337,7 @@ static bool ClosesAt(string s, int open, int close) _ => ParameterNameMessages.TierWithoutPrefix, }; - static string? Find(string expression, string procedure, string candidate, ImmutableArray parameterNames, ImmutableArray bareNames, string? subject, string? fix = null) + static string? Find(string expression, string procedure, string candidate, ImmutableArray parameterNames, ImmutableArray bareNames, string? subject, string? fix, string declares) { // Tier 1: exact. Tier 2: ignoring case. Tier 3: ignoring case and underscores. Tier 4: the same without one common parameter prefix. for (int tier = 1; tier <= 4; tier++) @@ -351,7 +353,8 @@ static bool ClosesAt(string s, int open, int close) ParameterNameMessages.Ambiguous( subject ?? ParameterNameMessages.TheArgument(expression), found, real, procedure, candidate, - TierText(tier), string.Join(", ", parameterNames), + TierText(tier), declares, + string.Join(", ", parameterNames), fix ?? (subject is null ? ParameterNameMessages.NameParameterExplicitly : ParameterNameMessages.NameWithColumn(subject)))); diff --git a/Source/Core/TextNameCache.cs b/Source/Core/TextNameCache.cs index 8f20e6d7..e94cc6bc 100644 --- a/Source/Core/TextNameCache.cs +++ b/Source/Core/TextNameCache.cs @@ -67,5 +67,6 @@ public static bool HasMarkers(string text) } static string? Slow(string text, string expression) - => new NameSet(SqlTextParameters.Parse(text)).Match(expression, text); + => new NameSet(SqlTextParameters.Parse(text)) + .Match(expression, text, declares: ParameterNameMessages.ItDeclares); } diff --git a/Tests/Open.Database.Extensions.Core.Tests/AllocationQuickWinTests.cs b/Tests/Open.Database.Extensions.Core.Tests/AllocationQuickWinTests.cs index 7061c394..962ad5b1 100644 --- a/Tests/Open.Database.Extensions.Core.Tests/AllocationQuickWinTests.cs +++ b/Tests/Open.Database.Extensions.Core.Tests/AllocationQuickWinTests.cs @@ -256,12 +256,12 @@ public static void ToDictionary_ANullMapping_ThrowsArgumentNull() .GetMethod("BareNames", BindingFlags.Static | BindingFlags.NonPublic)! .CreateDelegate, ImmutableArray>>(); - static readonly Func, ImmutableArray, ImmutableArray, string, string, string?, string?, string?> MatchBare = ParameterNamesType + static readonly Func, ImmutableArray, ImmutableArray, string, string, string?, string?, string, string?> MatchBare = ParameterNamesType .GetMethod("MatchBareAs", BindingFlags.Static | BindingFlags.NonPublic)! - .CreateDelegate, ImmutableArray, ImmutableArray, string, string, string?, string?, string?>>(); + .CreateDelegate, ImmutableArray, ImmutableArray, string, string, string?, string?, string, string?>>(); // The expression and the procedure only feed the message of an ambiguity; they cost nothing when there is none. - static string? Match(ImmutableArray candidates, ImmutableArray parameterNames) => MatchBare(candidates, parameterNames, BareNames(parameterNames), "argument", "dbo.procedure", null, null); + static string? Match(ImmutableArray candidates, ImmutableArray parameterNames) => MatchBare(candidates, parameterNames, BareNames(parameterNames), "argument", "dbo.procedure", null, null, ParameterNameMessages.ProcedureDeclares); static readonly ImmutableArray RealNames = [ diff --git a/Tests/Open.Database.Extensions.Core.Tests/DerivedNameCostTests.cs b/Tests/Open.Database.Extensions.Core.Tests/DerivedNameCostTests.cs index 0efe4eb3..c0554345 100644 --- a/Tests/Open.Database.Extensions.Core.Tests/DerivedNameCostTests.cs +++ b/Tests/Open.Database.Extensions.Core.Tests/DerivedNameCostTests.cs @@ -566,6 +566,7 @@ public static void AmbiguousArgument_ThrowsOnEveryCall() "@company_serial_num", "@companyserial_num", rig.Procedure, "companySerialNum", ParameterNameMessages.TierIgnoringCaseAndUnderscores, + ParameterNameMessages.ProcedureDeclares, "@company_serial_num, @companyserial_num", ParameterNameMessages.NameParameterExplicitly), ex.Message); diff --git a/Tests/Open.Database.Extensions.Core.Tests/ParameterNameAddParamsTests.cs b/Tests/Open.Database.Extensions.Core.Tests/ParameterNameAddParamsTests.cs index 7dcf18f0..7621169f 100644 --- a/Tests/Open.Database.Extensions.Core.Tests/ParameterNameAddParamsTests.cs +++ b/Tests/Open.Database.Extensions.Core.Tests/ParameterNameAddParamsTests.cs @@ -321,16 +321,16 @@ public static void AMemberOfARefStructType_MakesAddParamsThrowForThatType_UntilS .GetMethod("Candidates", BindingFlags.Static | BindingFlags.NonPublic)! .CreateDelegate>>(); - static readonly Func, ImmutableArray, ImmutableArray, string, string, string?, string?, string?> MatchBare = Names + static readonly Func, ImmutableArray, ImmutableArray, string, string, string?, string?, string, string?> MatchBare = Names .GetMethod("MatchBareAs", BindingFlags.Static | BindingFlags.NonPublic)! - .CreateDelegate, ImmutableArray, ImmutableArray, string, string, string?, string?, string?>>(); + .CreateDelegate, ImmutableArray, ImmutableArray, string, string, string?, string?, string, string?>>(); static readonly Func, ImmutableArray> BareNames = Names .GetMethod("BareNames", BindingFlags.Static | BindingFlags.NonPublic)! .CreateDelegate, ImmutableArray>>(); static string? Match(ImmutableArray candidates, ImmutableArray parameterNames, string expression, string procedure) - => MatchBare(candidates, parameterNames, BareNames(parameterNames), expression, procedure, null, null); + => MatchBare(candidates, parameterNames, BareNames(parameterNames), expression, procedure, null, null, ParameterNameMessages.ProcedureDeclares); [Theory] [InlineData("x", "x")] @@ -385,6 +385,7 @@ public static void Match_AnAmbiguity_QuotesWhatWasWritten_TheCandidate_TheTierAn "@customer_id", "@customer__id", "dbo.p", "CustomerId", ParameterNameMessages.TierIgnoringCaseAndUnderscores, + ParameterNameMessages.ProcedureDeclares, "@customer_id, @customer__id", ParameterNameMessages.NameParameterExplicitly), ex.Message); diff --git a/Tests/Open.Database.Extensions.Core.Tests/SqlTextDerivedNamesTests.cs b/Tests/Open.Database.Extensions.Core.Tests/SqlTextDerivedNamesTests.cs index 8a801611..abcd4f04 100644 --- a/Tests/Open.Database.Extensions.Core.Tests/SqlTextDerivedNamesTests.cs +++ b/Tests/Open.Database.Extensions.Core.Tests/SqlTextDerivedNamesTests.cs @@ -98,6 +98,13 @@ public static async Task Ambiguity_Throws() { Assert.StartsWith(ParameterNameMessages.TheArgument("order.Customer.Id") + " matches both '@customer_id' and '@customer__id' of '", ex.Message); Assert.Contains("Its candidate name 'CustomerId' fits each of them ignoring case and underscores.", ex.Message); + + // A text command declares parameters; it is not a procedure. + Assert.DoesNotContain(ParameterNameMessages.ProcedureDeclares, ex.Message); + Assert.EndsWith( + $"{ParameterNameMessages.ItDeclares}: @customer_id, @customer__id. " + + ParameterNameMessages.NameParameterExplicitly, + ex.Message); } } From 9f132eb8d5731e01a262424c3565e42a8dc50ae5 Mon Sep 17 00:00:00 2001 From: electricessence <5899455+electricessence@users.noreply.github.com> Date: Fri, 4 Dec 2026 11:17:08 -0800 Subject: [PATCH 5/7] Say "It declares" in the no-match message of a text command too A command of Type Text no longer says "The procedure declares" in the message of an argument that matches none of its parameters: ExpressiveCommandBase passes the words for the command's type to both the match and the no-match message, so the two agree. A stored procedure keeps "The procedure declares", word for word. SqlTextDerivedNamesTests pins the text-command message. Co-Authored-By: Claude Sonnet 5.5 --- Source/Core/ExpressiveCommandBase.cs | 14 +++++++++----- .../SqlTextDerivedNamesTests.cs | 7 +++++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Source/Core/ExpressiveCommandBase.cs b/Source/Core/ExpressiveCommandBase.cs index 18d371b4..37aa9c69 100644 --- a/Source/Core/ExpressiveCommandBase.cs +++ b/Source/Core/ExpressiveCommandBase.cs @@ -1160,9 +1160,7 @@ void Apply( : real!.Match( expression, Command, - declares: Type == CommandType.Text - ? ParameterNameMessages.ItDeclares - : ParameterNameMessages.ProcedureDeclares); + declares: DeclaresWords); if (name is null) { // A member of an object that the procedure does not take is simply not sent; an argument named by the caller must match. @@ -1231,8 +1229,14 @@ InvalidOperationException Collision(string name, Param first, Param second, Immu real)); InvalidOperationException NoMatch(string expression, ImmutableArray real) - => DbQueryBinding.NoMatch( - expression, Command, ParameterNameMessages.ProcedureDeclares, real); + => DbQueryBinding.NoMatch(expression, Command, DeclaresWords, real); + + // What a message says before the names the command declares: a text + // command is not a procedure. + string DeclaresWords + => Type == CommandType.Text + ? ParameterNameMessages.ItDeclares + : ParameterNameMessages.ProcedureDeclares; #endregion diff --git a/Tests/Open.Database.Extensions.Core.Tests/SqlTextDerivedNamesTests.cs b/Tests/Open.Database.Extensions.Core.Tests/SqlTextDerivedNamesTests.cs index abcd4f04..fc11443c 100644 --- a/Tests/Open.Database.Extensions.Core.Tests/SqlTextDerivedNamesTests.cs +++ b/Tests/Open.Database.Extensions.Core.Tests/SqlTextDerivedNamesTests.cs @@ -116,6 +116,13 @@ public static async Task NoMatch_Throws() Assert.StartsWith("The argument 'order.Customer.Id' matches none of the parameters of '", ex.Message); Assert.Contains("tried orderCustomerId, CustomerId, Id", ex.Message); Assert.Contains("@a, @b", ex.Message); + + // A text command declares parameters; it is not a procedure. + Assert.DoesNotContain(ParameterNameMessages.ProcedureDeclares, ex.Message); + Assert.EndsWith( + $"{ParameterNameMessages.ItDeclares}: @a, @b. " + + ParameterNameMessages.NameParameterExplicitly, + ex.Message); } } From 77f9233035731c878cdb8b4a92ca527c3e92365d Mon Sep 17 00:00:00 2001 From: electricessence <5899455+electricessence@users.noreply.github.com> Date: Fri, 4 Dec 2026 11:20:15 -0800 Subject: [PATCH 6/7] Name the command text, not "The procedure", in the collision message of a text command A command of Type Text says "'' declares: ..." in the message of two parameters that resolve to one name, the wording a DbQuery definition already uses, so none of the three messages of a text command (ambiguous, no match, collision) calls its SQL a procedure. A stored procedure keeps "The procedure '' declares:", word for word. SqlTextDerivedNamesTests pins the text-command message. Co-Authored-By: Claude Sonnet 5.5 --- Source/Core/ExpressiveCommandBase.cs | 4 +++- .../SqlTextDerivedNamesTests.cs | 18 ++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Source/Core/ExpressiveCommandBase.cs b/Source/Core/ExpressiveCommandBase.cs index 37aa9c69..30b03c16 100644 --- a/Source/Core/ExpressiveCommandBase.cs +++ b/Source/Core/ExpressiveCommandBase.cs @@ -1225,7 +1225,9 @@ InvalidOperationException Collision(string name, Param first, Param second, Immu name, Written(first), Written(second), - $"The procedure '{Command}'", + Type == CommandType.Text + ? $"'{Command}'" + : $"The procedure '{Command}'", real)); InvalidOperationException NoMatch(string expression, ImmutableArray real) diff --git a/Tests/Open.Database.Extensions.Core.Tests/SqlTextDerivedNamesTests.cs b/Tests/Open.Database.Extensions.Core.Tests/SqlTextDerivedNamesTests.cs index fc11443c..87419e0c 100644 --- a/Tests/Open.Database.Extensions.Core.Tests/SqlTextDerivedNamesTests.cs +++ b/Tests/Open.Database.Extensions.Core.Tests/SqlTextDerivedNamesTests.cs @@ -136,8 +136,22 @@ public static async Task ANameOnlyInAStringOrAComment_IsNotDeclared() [Fact] public static async Task TwoArgumentsThatFindTheSameToken_Collide() { - foreach (InvalidOperationException ex in await AllFail("select 1 where a = @region_id", "filter.RegionId", "other.RegionId")) - Assert.StartsWith(ParameterNameMessages.Collision("@region_id", ParameterNameMessages.WrittenAsArgument("filter.RegionId"), ParameterNameMessages.WrittenAsArgument("other.RegionId")), ex.Message); + const string sql = "select 1 where a = @region_id"; + + foreach (InvalidOperationException ex in await AllFail(sql, "filter.RegionId", "other.RegionId")) + { + Assert.Equal( + ParameterNameMessages.Collision( + "@region_id", + ParameterNameMessages.WrittenAsArgument("filter.RegionId"), + ParameterNameMessages.WrittenAsArgument("other.RegionId"), + $"'{sql}'", + ["@region_id"]), + ex.Message); + + // A text command declares parameters; it is not a procedure. + Assert.DoesNotContain("The procedure", ex.Message); + } } // ---- no token: nothing that works today changes ---- From 529d3d9fffb032f0b15dd114db02ace2edd30431 Mon Sep 17 00:00:00 2001 From: electricessence <5899455+electricessence@users.noreply.github.com> Date: Fri, 4 Dec 2026 11:24:15 -0800 Subject: [PATCH 7/7] Say "It declares" in the output-binding ambiguity messages of a text command too OutputBinding.Find and NameSet.MatchName passed no words for the names a command declares, so an output member or a named output that fits two parameters of a text command said "The procedure declares". ParameterNameMessages.DeclaresWords(type) gives the words for a command type ("It declares" for text, "The procedure declares" otherwise, word for word as before), and ExpressiveCommandBase, OutputBinding and NameSet.MatchName use it. Two tests in OutputParameterTests pin the model-member path and the named-output path on a text command. Co-Authored-By: Claude Sonnet 5.5 --- Source/Core/Core/ParameterNameMessages.cs | 9 +++++ Source/Core/ExpressiveCommandBase.cs | 5 +-- Source/Core/NameSet.cs | 11 ++++- Source/Core/OutputBinding.cs | 20 +++++++--- .../OutputParameterTests.cs | 40 +++++++++++++++++++ 5 files changed, 74 insertions(+), 11 deletions(-) diff --git a/Source/Core/Core/ParameterNameMessages.cs b/Source/Core/Core/ParameterNameMessages.cs index 20c76f98..64133d94 100644 --- a/Source/Core/Core/ParameterNameMessages.cs +++ b/Source/Core/Core/ParameterNameMessages.cs @@ -30,6 +30,15 @@ public const string ProcedureDeclares public const string ItDeclares = "It declares"; + /// + /// The words before the names that a command declares, by its type: a + /// text command is not a procedure. + /// + /// The command's type. + /// The words. + public static string DeclaresWords(CommandType type) + => type == CommandType.Text ? ItDeclares : ProcedureDeclares; + /// /// The call that names a parameter, as the fix of a message writes it. /// diff --git a/Source/Core/ExpressiveCommandBase.cs b/Source/Core/ExpressiveCommandBase.cs index 30b03c16..30d7086e 100644 --- a/Source/Core/ExpressiveCommandBase.cs +++ b/Source/Core/ExpressiveCommandBase.cs @@ -1235,10 +1235,7 @@ InvalidOperationException NoMatch(string expression, ImmutableArray real // What a message says before the names the command declares: a text // command is not a procedure. - string DeclaresWords - => Type == CommandType.Text - ? ParameterNameMessages.ItDeclares - : ParameterNameMessages.ProcedureDeclares; + string DeclaresWords => ParameterNameMessages.DeclaresWords(Type); #endregion diff --git a/Source/Core/NameSet.cs b/Source/Core/NameSet.cs index ce88a6b4..12b575da 100644 --- a/Source/Core/NameSet.cs +++ b/Source/Core/NameSet.cs @@ -148,16 +148,23 @@ public void KeepMetadata(ParameterMetadata metadata) /// The procedure's name or the command text, for the message of an ambiguity. /// What matches, for the message of an ambiguity. /// What to do about an ambiguity. + /// The words before the declared names in the message of an ambiguity. /// The real name, or when the name matches none. /// The name fits more than one parameter equally well. - public string? MatchName(string name, string procedure, string subject, string fix) + public string? MatchName( + string name, + string procedure, + string subject, + string fix, + string declares) { if (_nameMatches.TryGetValue(name, out string? remembered)) return remembered; string bare = name.Length > 0 && name[0] == '@' ? name[1..] : name; // Two threads may both match and store: the answer is the same. - string? found = ParameterNames.MatchBareAs([bare], Names, BareNames, name, procedure, subject, fix); + string? found = ParameterNames.MatchBareAs( + [bare], Names, BareNames, name, procedure, subject, fix, declares); if (_nameMatches.Count < MaxMatches) _nameMatches[name] = found; return found; diff --git a/Source/Core/OutputBinding.cs b/Source/Core/OutputBinding.cs index c23b71be..c5b329fe 100644 --- a/Source/Core/OutputBinding.cs +++ b/Source/Core/OutputBinding.cs @@ -121,7 +121,7 @@ public static void Resolve( continue; } - resolved[i] = Find(member, real!, commandText) + resolved[i] = Find(member, real!, type, commandText) ?? throw NoOutputMatch(member, real!.Names, where); } @@ -229,10 +229,19 @@ static void CheckMetadata( // An exact member ([Column]) names its parameter; the others go through // the tiers of AddParam's names: a named output over the name it was given // (or the candidates it carries), a model member over the member's name. - static string? Find(OutputMember member, NameSet real, string commandText) + static string? Find( + OutputMember member, + NameSet real, + CommandType type, + string commandText) { + string declares = ParameterNameMessages.DeclaresWords(type); if (member.Exact) return real.Find(member.Name)?.Real; - if (!member.Named) return real.Match(member.Name, commandText, member.Display); + if (!member.Named) + { + return real.Match( + member.Name, commandText, member.Display, declares); + } string fix = OutputArguments.ExactNameFix(member.Form); @@ -240,7 +249,8 @@ static void CheckMetadata( // remembered by that name. if (member.Form != OutputForm.Capture) { - return real.MatchName(member.Name, commandText, member.Display, fix); + return real.MatchName( + member.Name, commandText, member.Display, fix, declares); } ImmutableArray candidates = member.Candidates.IsDefault @@ -253,7 +263,7 @@ static void CheckMetadata( // by the name, answers for one candidate. return ParameterNames.MatchBareAs( candidates, real.Names, real.BareNames, - member.Name, commandText, member.Display, fix); + member.Name, commandText, member.Display, fix, declares); } /// diff --git a/Tests/Open.Database.Extensions.Core.Tests/OutputParameterTests.cs b/Tests/Open.Database.Extensions.Core.Tests/OutputParameterTests.cs index 188a017c..83d7aebe 100644 --- a/Tests/Open.Database.Extensions.Core.Tests/OutputParameterTests.cs +++ b/Tests/Open.Database.Extensions.Core.Tests/OutputParameterTests.cs @@ -71,6 +71,46 @@ public sealed class NotMappedOnly public int Count { get; set; } } + public sealed class Counted + { + public int PostCount { get; set; } + } + + // A text command declares parameters; it is not a procedure. + [Fact] + public static async Task AModelMember_FittingTwoParametersOfATextCommand_SaysItDeclares() + { + var c = new OutputConnection(); + + var ex = await Assert.ThrowsAsync( + async () => await c + .Command("set @post_count = 1; set @postcount_ = 2;") + .ExecuteOutputAsync(Token)); + + Assert.Contains("Counted.PostCount matches both", ex.Message); + Assert.DoesNotContain(ParameterNameMessages.ProcedureDeclares, ex.Message); + Assert.Contains( + $"{ParameterNameMessages.ItDeclares}: @post_count, @postcount_.", + ex.Message); + } + + [Fact] + public static async Task ANamedOutput_FittingTwoParametersOfATextCommand_SaysItDeclares() + { + var c = new OutputConnection(); + + var ex = await Assert.ThrowsAsync( + async () => await c + .Command("set @post_count = 1; set @postcount_ = 2;") + .ExecuteOutputAsync("PostCount", Token)); + + Assert.Contains("matches both", ex.Message); + Assert.DoesNotContain(ParameterNameMessages.ProcedureDeclares, ex.Message); + Assert.Contains( + $"{ParameterNameMessages.ItDeclares}: @post_count, @postcount_.", + ex.Message); + } + // ---- the provider ------------------------------------------------------------ // Hands out commands that record their parameters and, when executed, let the test fill the outputs.