diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-02-20 18:16:56 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-02-21 15:46:18 -0800 |
commit | a566ee5308023f1a0ea9c06e7b1b2f70cef85c87 (patch) | |
tree | bc572fa4d48300775337b8da8fc02667d2aab272 /activerecord | |
parent | c73f8833d59c587be3029be9ba624689a61cc14c (diff) | |
download | rails-a566ee5308023f1a0ea9c06e7b1b2f70cef85c87.tar.gz rails-a566ee5308023f1a0ea9c06e7b1b2f70cef85c87.tar.bz2 rails-a566ee5308023f1a0ea9c06e7b1b2f70cef85c87.zip |
tag bind params with a bind param object
Diffstat (limited to 'activerecord')
3 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb index 5a2493f69d..7d024a5549 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb @@ -158,7 +158,7 @@ module ActiveRecord # Returns a bind substitution value given a +column+ and list of current # +binds+ def substitute_at(column, index) - Arel.sql '?' + Arel::Nodes::BindParam.new '?' end # REFERENTIAL INTEGRITY ==================================== diff --git a/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb index 626571a948..3c534b5ece 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb @@ -66,7 +66,7 @@ module ActiveRecord end def substitute_at(column, index) - Arel.sql "\0" + Arel::Nodes::BindParam.new "\0" end # CONNECTION MANAGEMENT ==================================== diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 24a0ba2612..4370f27d6b 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -642,7 +642,7 @@ module ActiveRecord end def substitute_at(column, index) - Arel.sql("$#{index + 1}") + Arel::Nodes::BindParam.new "$#{index + 1}" end def exec_query(sql, name = 'SQL', binds = []) |