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

Make an ast for compile_update as needed #241

Closed
wants to merge 1 commit into from

Conversation

lloeki
Copy link

@lloeki lloeki commented Feb 4, 2014

my_table.compile_update(whatever) alone crashes because the ast is nil, whereas both my_table.where(something).compile_update(whatever) and my_table.select_manager.compile_update(whatever) have their way.

This lets the problematic case behave like the latter.

This might apply to compile_insert and compile_delete as well.

@rafaelfranca
Copy link
Member

Could you add a test case for this?

@tamird
Copy link

tamird commented Sep 16, 2014

@lloeki needs a test. otherwise, will close soon

@lloeki
Copy link
Author

lloeki commented Sep 16, 2014

Got it. Life's pretty tough right now but I will try to get something soon.

@vipulnsward
Copy link
Member

@lloeki Here's a test for reference for updating https://gist.github.com/vipulnsward/c6a24b0221264b5ab3b9

@lloeki
Copy link
Author

lloeki commented Sep 23, 2014

@vipulnsward Thanks for the pointer, I'll commit on getting that done by the end of the week.

`my_table.compile_update(whatever)` alone crashes because the ast is nil, whereas
both `my_table.where(something).compile_update(whatever)` and
`my_table.select_manager.compile_update(whatever)` have their way.

This lets the problematic case behave like the latter.

This takes care of `compile_insert` and `compile_delete` as well.
@lloeki
Copy link
Author

lloeki commented Sep 29, 2014

Here are the tests, also for insert (which did not require anything to pass) and delete (which required some context to be added)

@matthewd
Copy link
Member

Per #523, Arel development is moving to rails/rails.

If this PR is still relevant, please consider reopening it over there.

@matthewd matthewd closed this Apr 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants