Skip to content

Add queryFirstWithTraits#229

Open
mdirolf wants to merge 1 commit intopmndrs:mainfrom
mdirolf:query-first-with-traits
Open

Add queryFirstWithTraits#229
mdirolf wants to merge 1 commit intopmndrs:mainfrom
mdirolf:query-first-with-traits

Conversation

@mdirolf
Copy link
Contributor

@mdirolf mdirolf commented Feb 6, 2026

This is mostly just a proof of concept - obviously doesn't make sense unless you're satisfied with the api @krispya

@mdirolf
Copy link
Contributor Author

mdirolf commented Feb 6, 2026

I added readFirst to QueryResults just to make this easier to implement. If preferable we could ditch the queryFirstWithTraits part and just stick with readFirst only. If you think it's better could also potentially change the readFirst return type to match a bit closer to the callback params for readEach (i.e. [ [...traits], Entity] | [[...undefined], undefined]).

LMK if either of those are preferable to this and I'd be happy to change this PR to match.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant