Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a method to Query to count the number of matches #1451

Open
RiscadoA opened this issue Jan 27, 2025 · 0 comments
Open

Add a method to Query to count the number of matches #1451

RiscadoA opened this issue Jan 27, 2025 · 0 comments
Labels
A-Core B-ECS P-Normal This issue isn't a big priority, but it would still be nice to have it closed soon

Comments

@RiscadoA
Copy link
Member

Problem

If you want to count the number of results a given query matches, you must write a for loop which increments a variable.

Solution

Since this isn't supper uncommon, we should have a method count() on Query which implements the for loop for us and returns the result.

@RiscadoA RiscadoA added A-Core B-ECS P-Normal This issue isn't a big priority, but it would still be nice to have it closed soon labels Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Core B-ECS P-Normal This issue isn't a big priority, but it would still be nice to have it closed soon
Projects
None yet
Development

No branches or pull requests

1 participant