You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the total number of records is 6, but our limit is 10, meaning the total number of records in the database is less than our limit, we encounter a problem in the response.
I would appreciate it if you could check this issue. Thank you for the excellent package you've developed; it's been very helpful.
The text was updated successfully, but these errors were encountered:
Hello dear friend,
According to the GORM documentation, the offset should be configured as follows:
https://gorm.io/docs/scopes.html#Pagination
offset := (page - 1) * pageSize
However, in your code, you have set it to:
https://github.com/morkid/paginate/blob/6a80ba937ff9c76f988630fe32526430da23a071/paginate.go#L334C2-L334C32
If the total number of records is 6, but our limit is 10, meaning the total number of records in the database is less than our limit, we encounter a problem in the response.
I would appreciate it if you could check this issue. Thank you for the excellent package you've developed; it's been very helpful.
The text was updated successfully, but these errors were encountered: