Fix relation enumeration naming for 0.10 (breaking change) - #111
Open
bazer wants to merge 1 commit into
Open
Conversation
Rename the keyed AsEnumerable member to AsKeyValuePairs on the relation interface, implementation, and existing mock. This restores standard LINQ AsEnumerable binding to rows while retaining explicit primary-key/row enumeration and its existing synchronous loading behavior. Extend relation compliance tests to cover interface and concrete row views, deferred loading, empty relations, keyed identity, and composite keys. This is an intentional source and binary breaking change for 0.10.
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.
IImmutableRelation<T>enumerates rows, but itsAsEnumerable()instance member returns primary-key/row pairs and hides the standard LINQ extension. The same-looking call therefore changes both the element type and loading timing unexpectedly.This PR renames that member to
AsKeyValuePairs()on the public interface, runtime implementation, and existing mock. Standard LINQrelation.AsEnumerable()now exposes the existing row sequence without loading at the call.AsKeyValuePairs()retains the previous keyed behavior, including possible synchronous loading and dictionary construction.This is an intentional breaking change for 0.10. Consumers must recompile, pair-consuming calls must use
AsKeyValuePairs(), and custom implementations must implement the renamed member. Audit inferred calls even when they still compile: they can now yield rows instead of pairs. No obsolete alias is retained because it would continue hiding the standard extension.The PR contains only the runtime rename and regression coverage. Async implementation, package changes, and the ongoing planning/migration documentation are excluded. The existing mock's unimplemented operations remain outside this change.
Validation:
net8.0,net9.0, andnet10.0with zero warnings/errors.git diff --checkpassed. Validation ran against the matching source files in the existing checkout; the three transferred PR files were compared with those files before committing.Commands run from the repository root:
Related to #107; this does not complete the async workstream.