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

Deprecate {insert|update|delete}_sql in DatabaseStatements #23086

Merged

Conversation

kamipo
Copy link
Member

@kamipo kamipo commented Jan 17, 2016

Originally, {insert|update|delete}_sql is protected methods.
We can use the {insert|update|delete} public methods instead.

https://github.com/rails/rails/blob/v5.0.0.beta1/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#L378-L392

@rails-bot
Copy link

rails-bot commented Jan 17, 2016

r? @chancancode

(@rails-bot has picked a reviewer for you, use r? to override)

@kamipo
Copy link
Member Author

kamipo commented Jan 21, 2016

In Rails 3.0, {insert|update|delete}_sql is used in {insert|update|delete}.

https://github.com/rails/rails/blob/3-0-stable/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb#L43-L55

Currently {insert|update|delete}_sql is replaced to exec_{insert|update|delete} for using bind parameters.

8571fac
f1df6b2
1d7c033

I think that we don't use {insert|update|delete}_sql anymore in the internal.

r? @rafaelfranca

@rafaelfranca
Copy link
Member

rafaelfranca commented Jan 29, 2016

Could you add a CHANGELOG entry?

@kamipo kamipo force-pushed the deprecate_insert_update_delete_sql branch 2 times, most recently from 4c694cd to 26262a4 Compare Jan 29, 2016
@kamipo
Copy link
Member Author

kamipo commented Jan 29, 2016

I added a CHANGELOG entry!

@vipulnsward
Copy link
Member

vipulnsward commented Jan 29, 2016

Needs a deprecation test?

@kamipo kamipo force-pushed the deprecate_insert_update_delete_sql branch 9 times, most recently from 1a0f7fd to edf289e Compare Feb 3, 2016
@kamipo kamipo force-pushed the deprecate_insert_update_delete_sql branch 3 times, most recently from 73dc026 to 7da8d51 Compare Feb 13, 2016
@kamipo kamipo force-pushed the deprecate_insert_update_delete_sql branch 2 times, most recently from 3850869 to cdf5724 Compare Feb 18, 2016
@kamipo kamipo force-pushed the deprecate_insert_update_delete_sql branch 4 times, most recently from c703d7c to 87987f7 Compare Mar 1, 2016
Originally, `{insert|update|delete}_sql` is protected methods.
We can use the `{insert|update|delete}` public methods instead.
@kamipo kamipo force-pushed the deprecate_insert_update_delete_sql branch from 87987f7 to 6b937bb Compare Mar 2, 2016
@kamipo
Copy link
Member Author

kamipo commented Mar 2, 2016

Added a deprecation test.
Do we still keep these methods in Rails 5.0 or later?

rafaelfranca added a commit that referenced this pull request Mar 2, 2016
Deprecate `{insert|update|delete}_sql` in `DatabaseStatements`
@rafaelfranca rafaelfranca merged commit 31b8903 into rails:master Mar 2, 2016
1 check passed
@kamipo kamipo deleted the deprecate_insert_update_delete_sql branch Mar 2, 2016
yahonda added a commit to yahonda/oracle-enhanced that referenced this pull request Jun 24, 2016
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

6 participants