-
Notifications
You must be signed in to change notification settings - Fork 5
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
orderBy multiple fields #30
Comments
orderBy([“user”, “updatedAt”])
…Sent from my iPhone
On Nov 30, 2019, at 6:45 PM, bymaximus ***@***.***> wrote:
Is there some way to use orderBy with more than one field?
For example, this
orderBy(r.desc('fieldA'), r.desc('fieldB'))
have different results from
orderBy(r.desc('fieldA')).orderBy(r.desc('fieldB'))
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
This will order by ASC, seems the code is hardcoded to get the sort direction from the second element of the array, which makes impossible to use for example
|
Here's your 2 options:
|
This lib looks like it needs some attention. @bymaximus if you'd like to help contribute to the code base here, I'm more than happy to help you push PR's along 👍🏽 |
Is there some way to use orderBy with more than one field?
For example, this
orderBy(r.desc('fieldA'), r.desc('fieldB'))
have different results from
orderBy(r.desc('fieldA')).orderBy(r.desc('fieldB'))
The text was updated successfully, but these errors were encountered: