Repository navigation
Old APIs with a direct 11.0 replacement are marked [Obsolete], each naming its replacement - #107
Merged
Merged
Conversation
…aries without a nullable warning Retrieve returns QueryResultQueue<object[]>, but DequeueAs<T> and DequeueAsMappedDictionaries took QueryResult<Queue<object?[]>>. QueryResult<T> is invariant, so a nullable-enabled caller got CS8620 on cmd.Retrieve().DequeueAsMappedDictionaries(). The rows hold object values (DBNull for NULL, never null), so the parameters are now QueryResult<Queue<object[]>>, as is Transformer<T>.AsDequeueingEnumerable(QueryResult<Queue<object[]>>). This is a nullable annotation change only; there is no binary change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…aming its replacement (library) Groups 1-7: IExecuteReader Results<T>, ExpressiveDbCommand ResultsAsync<T>/TakeAsync/ToListAsync(transform), ResultsFromDataTable<T>, the selector FirstOrDefault/SingleOrDefault/Take/Skip/SkipThenTake, QueryResultCollection, AsMappedDictionaries and DequeueAs<T>. Removal in 12. No new public API. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…tionTests guards the messages and the replacements Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…rogram.cs checks they agree Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… the pages that named the old calls Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…th attributes, the sample uses a typed command and ImmutableArray Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…s (IDE0303) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…rned a one-pass enumerable and ToList() returns a List<T>, the QueryResultCollection message is one shared constant, and Deprecated.cs has a blank line between every method. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # Benchmarks/Open.Database.Extensions.Benchmarks/SyncBenchmarks.cs # Source/Core/Core/QueryResult.cs # Tests/Open.Database.Extensions.Core.Tests/ConstructorBindingTests.cs # Tests/Open.Database.Extensions.Core.Tests/MappingCharacterizationTests.cs # Tests/Open.Database.Extensions.Core.Tests/MappingCostAndRaceCharacterizationTests.cs # Tests/Open.Database.Extensions.Core.Tests/RequiredMemberTests.cs # Tests/Open.Database.Extensions.Core.Tests/RetrieveSurfaceTests.cs # Tests/Open.Database.Extensions.Core.Tests/RowMapFamilyTests.cs # Tests/Open.Database.Extensions.Core.Tests/RowMapNullTests.cs # Tests/Open.Database.Extensions.Core.Tests/RowMapUnderscoreTests.cs # Tests/Open.Database.Extensions.Core.Tests/UnmappableTypeTests.cs
This was referenced Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on PR 106 (merged): the
Retrieve().DequeueAsMappedDictionaries()replacement in the messages and samples compiles warning-free because of it.What changes
22 members in 7 groups are marked
[Obsolete](a warning, CS0618, not an error) and will be removed in 12. Every message names the exact call to type instead, the behaviour difference, and ends with "Removed in 12." There is no new public API, and no PublicAPI file change (the analyzer does not track[Obsolete]). Nothing in Source calls any of them.Results<T>(IExecuteReader, RowMap<T>? = null).Map<T>().ToList(); with a map.Map(map).ToList().SingleResult()keeps the old behaviour). ReturnsList<T>.Mapdoes not accept a null map.ExpressiveDbCommand.ResultsAsync<T>(RowMap<T>? = null)andResultsAsync<T>().Map<T>().ToListAsync(); with a map.Map(map).ToListAsync()(token optional)ResultsFromDataTable<T>(IDataReader,IDbCommand)using var table = command.ToDataTable(); table.To<T>(map, true).ToList()RowMap<T>.Defaultfirst to fail early.FirstOrDefault(selector)onIExecuteReader.Map(selector).FirstOrDefault()SingleOrDefault(selector)onIExecuteReader.Map(selector).SingleOrDefault()Take(count, selector)onIExecuteReader.Map(selector).Take(count).ToList()Take(0)now runs the command.Skip(count, selector)onIExecuteReader.Map(selector).Skip(count).ToList()SkipThenTake(skip, take, selector)onIExecuteReader.Map(selector).Skip(skip).Take(take).ToList()SkipandTake.ExpressiveDbCommand.TakeAsync(selector, count, behavior).Map(selector).Take(count).ToListAsync(cancellationToken)List<T>.Take(0)now runs the command. NoCommandBehavior: with one, useIterateReaderWhileAsync(r => { list.Add(selector(r)); return list.Count < count; }, behavior).ExpressiveDbCommand.ToListAsync(selector, behavior).Map(selector).ToListAsync(cancellationToken)CommandBehavior: with one, useIterateReaderAsync(r => list.Add(selector(r)), behavior).QueryResultCollection<T>,QueryResultCollection<T, TResult>List<T>fromMap<T>().ToList(), or your own class.QueryResultExtensions.AsMappedDictionaries(3 overloads)cmd.Retrieve().DequeueAsMappedDictionaries(); async(await cmd.RetrieveAsync()).DequeueAsMappedDictionaries()DequeueAsMappedDictionariesdrains the queue as it is enumerated, so it reads once.QueryResultExtensions.DequeueAs<T>(5 overloads)cmd.Map<T>().ToList()(cmd.Map(map).ToList()with a map); asyncawait cmd.Map<T>().ToListAsync();IDbCommandcommand.Results<T>();IDataReaderreader.ResultsBuffered<T>();DbCommandasyncawait command.ResultsAsync<T>()requiredcolumn is reported at the first row (not for an empty result). Later result sets are read. Null map not accepted.DequeueAs<T>returned a one-pass enumerable;ToList()returns aList<T>.Results<T>(IDbCommand)takes noCommandBehavior.DiagnosticIdandUrlFormatare not used: they do not exist onObsoleteAttributefor netstandard2.0/2.1, and a custom id would stop existingCS0618suppressions from covering these.Docs
whats-new-11.md: new section "Deprecated in 11.0" (table above, a before/after example for each group, and whyMapreads later result sets); the 11 example in "Upgrading from 10.x" now usesMap<Person>(PersonMap).ToList(); the two "Known limitations" bullets that namedDequeueAs<T>()are reworded.foundation.md(two sentences),mapping.md(the map parameter sentence, the "column must feed it" routes, and a paragraph in "Results, and a failure after the first one"),performance.md(one bullet),release-notes.md(one sentence on the 10.1.0 bullet).docsite/samples/Deprecated.cs.Tests
#pragma warning disable CS0618(with the reason: kept covered until 12).CS0618is not in any NoWarn.DeprecationTests: a reflection test over all 22 members (is[Obsolete], a warning, names its replacement call, ends "Removed in 12."), and equivalence tests (old and new give the same rows) forResults<T>,ResultsFromDataTable<T>, the selector forms,AsMappedDictionariesandDequeueAs<T>(theExpressiveDbCommandasync forms are compared by the sample checks below;QueryResultCollectionhas nothing to compare), plus the pinned differences: a null map, a selector that throws on a skipped row,Take(0)running the command.Deprecated.csplus 10 new checks in the samplesProgram.cs: before and after agree for every group (includingRetrieve().DequeueAsMappedDictionaries()and its awaited form, which compile warning-free with nullable enabled under-warnaserror), and the same two differences.Retrieve().DequeueAs<T>()carries a scoped pragma.Checks
From the gate (
verify-gate.ps1) on the committed tree:distinct warning lines: 0).Not in this change
The version bump and the "Changes since rc.3" note for rc.4. In 12, the removals need
*REMOVED*lines in the PublicAPI files.🤖 Generated with Claude Code