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 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 kamipo:deprecate_insert_update_delete_sql branch 2 times, most recently 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 kamipo:deprecate_insert_update_delete_sql branch 9 times, most recently Jan 29, 2016
@kamipo kamipo force-pushed the kamipo:deprecate_insert_update_delete_sql branch 3 times, most recently Feb 8, 2016
@kamipo kamipo force-pushed the kamipo:deprecate_insert_update_delete_sql branch 2 times, most recently Feb 17, 2016
@kamipo kamipo force-pushed the kamipo:deprecate_insert_update_delete_sql branch 4 times, most recently Feb 28, 2016
Originally, `{insert|update|delete}_sql` is protected methods.
We can use the `{insert|update|delete}` public methods instead.
@kamipo kamipo force-pushed the kamipo:deprecate_insert_update_delete_sql branch to 6b937bb 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
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@kamipo kamipo deleted the kamipo: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
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.