Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

QueryResult needs rework #85

Open
Ukendio opened this issue Dec 21, 2023 · 1 comment · May be fixed by #90
Open

QueryResult needs rework #85

Ukendio opened this issue Dec 21, 2023 · 1 comment · May be fixed by #90
Assignees

Comments

@Ukendio
Copy link
Contributor

Ukendio commented Dec 21, 2023

Currently if you use any of the methods of QueryResult it is expected to be used immediately. An example of how this behaviour could be a restriction is that you can't create a Snapshot following a query that has the :without() filter. And consequently impedes the implementation of View.

There are a few potential solutions:

  1. Make the query lazily loaded, and have the user chain on .build() (or analogous) -This is not very ergonomic at all.
  2. Let without modify the expand and next methods on QueryResult and return a new iterator - It is not clear how we would approach this and what issues it would create.
  3. We add query modifiers and allow that to mark the set of components for which to include and exclude. For example for _ in world:query(With(...), Without(....)). - This is completely changing of the api surface and very unrealistic for us to implement.
@jackTabsCode jackTabsCode added the enhancement New feature or request label Dec 21, 2023
@Ukendio Ukendio added needs design and removed enhancement New feature or request labels Dec 21, 2023
@Ukendio
Copy link
Contributor Author

Ukendio commented Dec 22, 2023

Minimal implementation at done #90.

@Ukendio Ukendio self-assigned this Dec 22, 2023
@Ukendio Ukendio linked a pull request Dec 30, 2023 that will close this issue
3 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants