aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2016-01-17 17:08:24 +0900
committerRyuta Kamizono <kamipo@gmail.com>2016-03-02 09:37:14 +0900
commit6b937bb9556bc7c51aa8cfa60791c4910763e5e3 (patch)
tree7441c82e364118ad4bee4975c093c520dd5c26e6 /activerecord/lib/active_record/connection_adapters/abstract
parent7fa15fe694561b862773456edc11964556fb913b (diff)
downloadrails-6b937bb9556bc7c51aa8cfa60791c4910763e5e3.tar.gz
rails-6b937bb9556bc7c51aa8cfa60791c4910763e5e3.tar.bz2
rails-6b937bb9556bc7c51aa8cfa60791c4910763e5e3.zip
Deprecate `{insert|update|delete}_sql` in `DatabaseStatements`
Originally, `{insert|update|delete}_sql` is protected methods. We can use the `{insert|update|delete}` public methods instead.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
index aa5ae15285..824040775d 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
@@ -125,18 +125,21 @@ module ActiveRecord
end
alias create insert
alias insert_sql insert
+ deprecate insert_sql: :insert
# Executes the update statement and returns the number of rows affected.
def update(arel, name = nil, binds = [])
exec_update(to_sql(arel, binds), name, binds)
end
alias update_sql update
+ deprecate update_sql: :update
# Executes the delete statement and returns the number of rows affected.
def delete(arel, name = nil, binds = [])
exec_delete(to_sql(arel, binds), name, binds)
end
alias delete_sql delete
+ deprecate delete_sql: :delete
# Returns +true+ when the connection adapter supports prepared statement
# caching, otherwise returns +false+