fluent-kit
fluent-kit copied to clipboard
Add `hasNext` and `hasPrevious` properties
This PR adds the properties hasNext and hasPrevious which are similar to the flask-sqlalchemy properties has_next and has_prev.
Can you add some tests to this? Especially to check the boundaries/edge cases. Like count of 0, trying to pass in a page of -1 etc
Can you add some tests to this? Especially to check the boundaries/edge cases. Like count of 0, trying to pass in a page of -1 etc
Should I add bounds to PageMetadata.page and PageMetadata.per then? Right now it will gladly accept a negative page number and a value of 0
Can you add some tests to this? Especially to check the boundaries/edge cases. Like count of 0, trying to pass in a page of -1 etc
Should I add bounds to
PageMetadata.pageandPageMetadata.perthen? Right now it will gladly accept a negative page number and a value of0
Yes we definitely need tests and count checking for this
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
bb47433) 47.39% compared to head (affcd01) 47.52%.
Additional details and impacted files
@@ Coverage Diff @@
## main #482 +/- ##
==========================================
+ Coverage 47.39% 47.52% +0.13%
==========================================
Files 106 106
Lines 4756 4768 +12
==========================================
+ Hits 2254 2266 +12
Misses 2502 2502
| Files | Coverage Δ | |
|---|---|---|
| ...luentKit/Query/Builder/QueryBuilder+Paginate.swift | 80.00% <100.00%> (+5.00%) |
:arrow_up: |