chore: migrate all queries and add_entity calls to use with! syntax.#856
Open
RobertJacobsonCDC wants to merge 5 commits intoRobertJacobsonCDC_814_hash_for_propertyfrom
Open
Conversation
Benchmark ResultsHyperfine
CriterionRegressions (slower)
Improvements (faster)
Unchanged / inconclusive (CI crosses 0%)
|
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.
This PR removes support for passing naked tuples of property values to the public query and
add_entityAPIs. Users now express property bundles withwith!(Entity, ...), and use the entity type itself, such asPerson, when they want the whole population or default initialization.The query implementation keeps the tuple machinery internally, but the public API is narrowed through a new
Querymarker trait. The oldQuerytrait was renamed toQueryInternal, its unnecessaryCopybound was removed, and public query methods now accept only the publicQuerysurface.EntityPropertyTuple<E, Q>and entity ZSTs implement that marker; naked tuples do not.Entity initialization follows the same public-facing rule.
add_entitynow acceptsPropertyInitializationList<E>, which is implemented forwith!(Entity, ...)bundles and for the entity type itself. The existingPropertyList<E>tuple machinery remains available for internal initialization work and type-level property lists used by value-change counting.The branch also migrates examples, tests, benches, and docs away from naked tuple values. User-facing documentation now consistently shows
with!(Person, Age(25))for property-filtered queries or initialization, andPersonfor whole-population queries or default initialization.Commits on this PR:
This PR is stacked on top of #848 and supersedes #833.