aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-10-26 13:02:14 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-10-26 13:44:11 -0700
commite73b0b84d939af241dfbba8931d8add9724595e4 (patch)
tree39fa3b203de14130f8579bca1f7989d2a693f6fa /activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
parent104d0b263e5d9b17216f06c72d422d26ca5a537f (diff)
downloadrails-e73b0b84d939af241dfbba8931d8add9724595e4.tar.gz
rails-e73b0b84d939af241dfbba8931d8add9724595e4.tar.bz2
rails-e73b0b84d939af241dfbba8931d8add9724595e4.zip
renaming bind_values to binds where it makes sense
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
index d95b950e18..a4d7d12298 100644
--- a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
@@ -143,11 +143,11 @@ module ActiveRecord
# DATABASE STATEMENTS ======================================
- def exec(sql, name = nil, bind_values = [])
+ def exec(sql, name = nil, binds = [])
log(sql, name) do
# Don't cache statements without bind values
- if bind_values.empty?
+ if binds.empty?
stmt = @connection.prepare(sql)
cols = stmt.columns
else
@@ -157,7 +157,7 @@ module ActiveRecord
stmt = cache[:stmt]
cols = cache[:cols] ||= stmt.columns
stmt.reset!
- stmt.bind_params bind_values.map { |col, val|
+ stmt.bind_params binds.map { |col, val|
col ? col.type_cast(val) : val
}
end
@@ -313,8 +313,8 @@ module ActiveRecord
end
protected
- def select(sql, name = nil, bind_values = []) #:nodoc:
- exec(sql, name, bind_values).map do |row|
+ def select(sql, name = nil, binds = []) #:nodoc:
+ exec(sql, name, binds).map do |row|
record = {}
row.each do |key, value|
record[key.sub(/^"?\w+"?\./, '')] = value if key.is_a?(String)