From f48a33be7db20db753ff06f430daf71ba31b0770 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 20 Feb 2012 18:16:56 -0800 Subject: tag bind params with a bind param object --- activerecord/lib/active_record/connection_adapters/abstract_adapter.rb | 2 +- activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb | 2 +- .../lib/active_record/connection_adapters/postgresql_adapter.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb index 07c2bc44d9..c6af682d28 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb @@ -166,7 +166,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 321d500da2..5ab9c24999 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 9f21bcb0c9..3925a9634e 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -721,7 +721,7 @@ module ActiveRecord end def substitute_at(column, index) - Arel.sql("$#{index + 1}") + Arel::Nodes::BindParam.new "$#{index + 1}" end class Result < ActiveRecord::Result -- cgit v1.2.3