Repository navigation
rc.4: table.Map<T>() maps the rows of a DataTable you already have (MappedTable<T>) - #120
Merged
Merged
Conversation
… the obsolete To<T>(DataTable) The "after" sample (shown in whats-new-11) and the deprecation test now use the replacement the ResultsFromDataTable message names: table.CreateDataReader(), then Map(map).ToList(). Co-Authored-By: Claude Opus 5.5 <[email protected]>
A shortcut for table.CreateDataReader().Map<T>(): MappedTable<T> has the reader view's members (no SingleResult) and the same five Map overloads. Each terminal reads the table through its own DataTableReader and disposes it; the table is not changed, so the view can be read more than once. The To<T>(DataTable), Transformer<T>.Results(DataTable) and ResultsFromDataTable messages, the samples and whats-new now point at table.Map(map).ToList(). Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
table.Map<T>(): map the rows of aDataTableyou already have, for 11.0.0-rc.4 (API shape).What
table.Map<T>()returnsMappedTable<T>, areadonly record structthat implementsIMappedQuery<T>with the reader view's members (every terminal in sync and async form,Read/ReadAsync,Skip/Take). NoSingleResult(), since a table has one result set.Map<T>overloads as onIDataReaderandIDbCommand: the same parameter lists,OverloadResolutionPriorityvalues and guards. A null map maps likeMap<T>().table.CreateDataReader().Map<T>(), which keeps working. The difference is ownership: the view creates and disposes its own reader.Ownership
DataTableReaderand disposes it. The table is not changed or cleared, so the view can be read more than once. No connection is involved, andNextResultis never called.Deprecations now point here
To<T>(DataTable, map, clearSourceTable),Transformer<T>.Results(DataTable, bool)andResultsFromDataTable<T>nametable.Map(map).ToList(). So do their rows in whats-new-11 and theResultsFromDataTable"after" sample.Docs and tests
MappedTableTestscovers:Readabandoned part way;T;Skip/Take;defaultstruct;Checks
🤖 Generated with Claude Code