Skip to content

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

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

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 January 29, 2016 07:41
@kamipo
Copy link
Member Author

kamipo commented Jan 29, 2016

I added a CHANGELOG entry!

@vipulnsward
Copy link
Member

Needs a deprecation test?

@kamipo kamipo force-pushed the deprecate_insert_update_delete_sql branch 9 times, most recently from 1a0f7fd to edf289e Compare February 3, 2016 12:39
@kamipo kamipo force-pushed the deprecate_insert_update_delete_sql branch 3 times, most recently from 73dc026 to 7da8d51 Compare February 13, 2016 20:15
@kamipo kamipo force-pushed the deprecate_insert_update_delete_sql branch 2 times, most recently from 3850869 to cdf5724 Compare February 18, 2016 02:45
@kamipo kamipo force-pushed the deprecate_insert_update_delete_sql branch 4 times, most recently from c703d7c to 87987f7 Compare March 1, 2016 20:52
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 March 2, 2016 00:37
@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
@kamipo kamipo deleted the deprecate_insert_update_delete_sql branch March 2, 2016 20:47
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.

6 participants