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
Knex version: 0.21.17
Database + version: ~#: mysql --version -> mysql Ver 14.14 Distrib 5.5.62, for debian-linux-gnu (x86_64) using readline 6.3
OS: Debian
I believe if no negative offset is allowed in mysql query, the knex query-builder should prevent it. (instead of letting the error happen and generated by mysql)
If it is knex that should implement this, and this is known as fix that needs to be done in knex, I'd love to contribute to code.
The text was updated successfully, but these errors were encountered:
@Ardeshir81 Considering that error thrown by driver in this case is pretty confusing, I think throwing an explicit error from Knex would be an improvement. PR would be most appreciated.
Environment
Knex version: 0.21.17
Database + version:
~#: mysql --version -> mysql Ver 14.14 Distrib 5.5.62, for debian-linux-gnu (x86_64) using readline 6.3
OS: Debian
Bug
I mistakenly passed
0
to this function, and my query became:select * from `` order by
Timedesc limit 20 offset -20
Error message
(sorry for the blue marks)
Reduced test code:
I believe if no negative offset is allowed in mysql query, the knex query-builder should prevent it. (instead of letting the error happen and generated by mysql)
If it is knex that should implement this, and this is known as fix that needs to be done in knex, I'd love to contribute to code.
The text was updated successfully, but these errors were encountered: