parse-community / parse-community/parse-server
Using limit() in count queries is ignored
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest version of Parse Server.
Issue Description
Using .limit(X) in a count() query is ignored.
Steps to reproduce
Run a query with .limit(X) on a collection.
Actual Outcome
The count result is the number of rows matching the query, which can be greater than the specified limit.
Expected Outcome
The count is the smallest of the number of rows and the X in .limit(X).
Environment
Server
- Parse Server version:
6.5.0-beta.1 - Operating system:
Ubuntu 22 - Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
local
Database
- System (MongoDB or Postgres):
MongoDB - Database version:
5.3.2 - Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
local
Logs
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing a Parse Server count query using .limit(X) against MongoDB, then trace how the count query handles the limit. Compare the result with the expected minimum of the matching-row count and X. Done means the count respects the limit without changing ordinary count behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, mongodb
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100