-
Notifications
You must be signed in to change notification settings - Fork 52
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
Make all query building methods append-only #61
Comments
The ability to add a column or overwrite all is good functionality. I can think of a good case where this wouldn't be a desired change, if you wanted to run a query i.e. a complex search with a limit of 10 results. But you need to show the total number of results too. So Query A contains the full query:
Query B is almost entirely the same query, minus the limit / offset and swapping the select for a count
This would then allow a streamlined way of displaying "Showing results 10 of 1000". If the Keeping addColumns and Columns as separate functions makes perfect sense to me |
Yes. This is valuable for pagination: Pass the full SelectQuery to the paginator and it generically create the COUNT query from any other. |
Refer to changes make in #58; the following methods should be modified:
addColumns()
intocolumns()
addFrom()
intofrom()
The text was updated successfully, but these errors were encountered: