Your Question
When I use offset but not limit, the SQL executed by Gorm only includes offset and not limit. Unfortunately, not all databases support using only offset without limit. In MySQL, limit and offset need to appear in pairs, and MySQL will report an error at this time. So I think this may be a problem, and I think setting the limit to "math. MaxInt" when the user only specifies offset can solve this problem.
The document you expected this should be explained
I want to know if this error was tacitly approved by the developer
Expected answer
If it is an unexpected bug for the developer, I can submit a PR.
Comment From: jinzhu
I suggest keeping it this way; returning an error might be more reasonable. We shouldn’t set an unreasonable limit value as it could mask and lead to a more serious issue.