-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
fix: allow LIMIT 0 for SELECT queries #918
base: master
Are you sure you want to change the base?
Conversation
690f449
to
a7b3e02
Compare
This commit enables the correct queries of type `SELECT ... LIMIT 0`. Before that, the limit-clause wasn't applied to the query.
The new tests fail for If this is true, it might be a better idea to fix those in a separate PR. UPD: this ticket seems related #811 |
@@ -31,7 +31,7 @@ type SelectQuery struct { | |||
group []schema.QueryWithArgs | |||
having []schema.QueryWithArgs | |||
order []schema.QueryWithArgs | |||
limit int32 | |||
limit *int32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use sql.NullInt32
here
@ygabuev this looks good, but I can't merge a PR that breaks the build.... |
Hi, I just implemented a fix for that problem in #1009. Could you please test if this workaround fixes your problem? |
This PR enables the correct queries of form
SELECT ... LIMIT 0
.Before that, the limit-clause wasn't applied to the query.
Closes #801