GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
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?
to your account
To paginate, I'm using query.clone().count('* as count'), but because the query has an ORDER BY, I'm getting an error: "must appear in the GROUP BY clause or be used in an aggregate function".
Is there a way to clear the query orderBy?
No there is not :( PR for that is always welcome. As a workaround you may be able to clone() query builder before orderBy is added?
I'm running into this too and would be willing to take a stab at fixing it if I could get a little bit of help on where to start.
I'm using feathers-bookshelf-service with bookshelf.
@roemhildtg here is the PR where clearSelect and clearWhere was added #1912 it should serve as a good reference how to implement more clearXXX methods
For orderBy you can use queryInstance._clearGrouping('order') to delete all order statements
add clearOrder method fix tgriesser#2360
add clearOrder method fix #2360 (#2553)