-
Notifications
You must be signed in to change notification settings - Fork 695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
why does limit(0) omit LIMIT from the final query? #845
Comments
limit(0)
omit LIMIT 0
from the final query?
I agree with @camhashemi . I find silently ignoring the "limit" clause weird, if limit is set to a value <1. Currently passing invalid arguments (limit <1) will silently expose all db rows. imho, limit=null would reflect the intention to get all rows without any limit. What do you think? |
especially with the query builder style, the less custom interpretation between DSL and SQL the better. passing |
I also agree with @camhashemi @bastman . I found the behavior when I have written some test cases for my app. Here is a sample project. |
Fixed. Will be available in 0.24.2 |
source code
this means that providing
limit(0)
is equivalent to not callinglimit
at all, which is odd behavior imho.At least for MySQL,
limit 0
doesn't behave this way.The text was updated successfully, but these errors were encountered: