tortoise
tortoise-orm
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
Corrected the names of variables in the _prefetch_m2m_relation method.
VladislavYar:expanding-prefetch-capabilities
9 hours ago
fix: clamp count() at 0 when offset exceeds total (#2208) * fix: clamp count() to limit/offset semantics at the edges COUNT(*) ignores LIMIT/OFFSET, so CountQuery applies them in Python. Two edge cases didn't match the limited query result: - offset greater than the total returned a negative number (e.g. .offset(100).count() == -95 for 5 rows) instead of 0. - limit(0) returned the full total instead of 0, because the limit clamp used a truthiness check (`if self._limit`) that skips 0. Clamp the offset subtraction at 0 and use `self._limit is not None` so an explicit limit(0) is honored. * docs: reference count fix PR in changelog * test: format count edge assertions
develop
3 days ago
test: format count edge assertions
koriyoshi2041:fix/count-negative-offset
3 days ago
docs: reference count fix PR in changelog
koriyoshi2041:fix/count-negative-offset
4 days ago
fix: clamp count() to limit/offset semantics at the edges COUNT(*) ignores LIMIT/OFFSET, so CountQuery applies them in Python. Two edge cases didn't match the limited query result: - offset greater than the total returned a negative number (e.g. .offset(100).count() == -95 for 5 rows) instead of 0. - limit(0) returned the full total instead of 0, because the limit clamp used a truthiness check (`if self._limit`) that skips 0. Clamp the offset subtraction at 0 and use `self._limit is not None` so an explicit limit(0) is honored.
koriyoshi2041:fix/count-negative-offset
4 days ago
Add test prefetch_related by UUID.
VladislavYar:expanding-prefetch-capabilities
4 days ago
fix: clamp count() at 0 when offset exceeds total COUNT(*) ignores LIMIT/OFFSET, so CountQuery applies the offset in Python by subtracting it. When the offset is greater than the total row count the subtraction went negative (e.g. .offset(100).count() returned -95 for 5 rows), whereas the equivalent SQL LIMIT/OFFSET returns 0 rows. Clamp the result at 0.
koriyoshi2041:fix/count-negative-offset
4 days ago
Add Tortoise ORM Agents Skill
waketzheng:ai-skill
4 days ago
Latest Branches
CodSpeed Performance Gauge
0%
feat: rewrote the method for getting m2m objects
#2205
3 days ago
b7fa7db
VladislavYar:expanding-prefetch-capabilities
CodSpeed Performance Gauge
0%
fix: clamp count() at 0 when offset exceeds total
#2208
4 days ago
3be1b35
koriyoshi2041:fix/count-negative-offset
CodSpeed Performance Gauge
0%
Add Tortoise ORM Agents Skill
#2209
4 days ago
058a77b
waketzheng:ai-skill
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs