diff options
author | Ken Collins <ken@metaskills.net> | 2011-04-22 20:33:43 +0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-04-22 22:32:55 +0800 |
commit | ed2820d6ecef7533970952437b974c7fa10192e1 (patch) | |
tree | 6a572eefb75c851276b3484c8866718f74943314 /activerecord/lib/active_record/connection_adapters/abstract | |
parent | 724a7866774c7847cc79b699ccf7da9fee72b154 (diff) | |
download | rails-ed2820d6ecef7533970952437b974c7fa10192e1.tar.gz rails-ed2820d6ecef7533970952437b974c7fa10192e1.tar.bz2 rails-ed2820d6ecef7533970952437b974c7fa10192e1.zip |
Move #exec_insert to abstract adapter's database statements.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb | 7 |
1 files changed, 7 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 6d9b5c7b32..5ff81aa023 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb @@ -55,6 +55,13 @@ module ActiveRecord def exec_query(sql, name = 'SQL', binds = []) end + # Executes insert +sql+ statement in the context of this connection using + # +binds+ as the bind substitutes. +name+ is the logged along with + # the executed +sql+ statement. + def exec_insert(sql, name, binds) + exec_query(sql, name, binds) + end + # Returns the last auto-generated ID from the affected table. # # +id_value+ will be returned unless the value is nil, in |