• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

typeorm / typeorm / 15467290624

05 Jun 2025 12:40PM UTC coverage: 76.345% (-0.03%) from 76.379%
15467290624

push

github

web-flow
fix: handle limit(0) and offset(0) correctly in SelectQueryBuilder (#11507)

* fix: handle limit(0) and offset(0) correctly in SelectQueryBuilder

- Fix JavaScript falsy value issue where limit(0) was treated as undefined
- Now limit(0) correctly generates 'LIMIT 0' SQL clause instead of being ignored
- Add helper functions hasLimit/hasOffset to distinguish between undefined and 0
- Add comprehensive test cases for zero value handling in limit/offset/take/skip
- Prevents potential security issue where limit(0) returned all records

Fixes potential data exposure when limit(0) was intended to return empty result

* fix: prettier formatting

* test: expand test coverage for LIMIT/OFFSET edge cases and regression prevention

9282 of 12868 branches covered (72.13%)

Branch coverage included in aggregate %.

20 of 20 new or added lines in 1 file covered. (100.0%)

8 existing lines in 3 files now uncovered.

18993 of 24168 relevant lines covered (78.59%)

196836.9 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

64.66
/src/logger/AbstractLogger.ts


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc