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

fix_for_reverse_order_with_functions #8741

Closed
wants to merge 2 commits into from
Closed

fix_for_reverse_order_with_functions #8741

wants to merge 2 commits into from

Conversation

joxxoxo
Copy link

@joxxoxo joxxoxo commented Jan 4, 2013

fix for reverse_sql_order using regexp (for details of bug see pull request #8225)

@shemerey
Copy link

shemerey commented Jan 9, 2013

unfortunately it doesn't work properly you could try next:

id asc, MAX(IFNULL(1,0), owned_essay_id)

expected:

[
 id DESC, 
 MAX(IFNULL(1,0), owned_essay_id) DES
]

got:

[
id DESC,
MAX(IFNULL(1,0) DESC
]

@joxxoxo
Copy link
Author

joxxoxo commented Jan 10, 2013

@shemerey fair point, i had an error in the regexp. fixed

@JonRowe
Copy link
Contributor

JonRowe commented Jul 1, 2013

Did this ever go anywhere? Is it still an issue for active record 4?

@shemerey
Copy link

shemerey commented Jul 1, 2013

yep it's still issue for active record

@sgrif
Copy link
Contributor

sgrif commented Oct 30, 2015

Thanks, but we've rejected similar PRs in the past. We do not want to end up having to parse the SQL here, as it's slow and error prone. reorder exists for these cases.

@sgrif sgrif closed this Oct 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants