Skip to content
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

Allow multiple calls to order in aggregates #207

Closed
wants to merge 1 commit into from

Conversation

Locke
Copy link

@Locke Locke commented Jun 23, 2013

In Model.find() you can order by multiple columns, this was not possible in aggregates

@Locke
Copy link
Author

Locke commented Jun 27, 2013

I just noticed ChainFind.order() checks if the property starts with "-" and applies descending order but AggregateFunctions.order() doesn't.

It's also not possible to pass an order at the initialization of an aggregation, but on find() it is.

Are these points blocking the merge?

@dresende
Copy link
Owner

We're having some nasty thing I don't know yet that is making the tests fail. I want to fix it before accepting this. About the order, there's an utility in Utilities.js created recently that we have to change everything in the lib that uses order to pass it through this utility.

@dresende
Copy link
Owner

I found the bug, it was sqlite3 v2.1.10. I had to downgrade to v2.1.7.

Although this pull now passes, I'm going to refuse it and change the .order() to accept any number of arguments and use Utilities.standardizeOrder. Thank you pointing this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants