From 853d39e8540a8af4c42592a172d4cf4f9c0f4e9f Mon Sep 17 00:00:00 2001
From: Aaron Patterson <aaron.patterson@gmail.com>
Date: Tue, 12 Oct 2010 16:03:11 -0700
Subject: removing some uses of execute

---
 .../lib/active_record/connection_adapters/sqlite_adapter.rb         | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

(limited to 'activerecord/lib/active_record')

diff --git a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
index 75bf579764..0d828046d7 100644
--- a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
@@ -173,9 +173,7 @@ module ActiveRecord
       alias :create :insert_sql
 
       def select_rows(sql, name = nil)
-        execute(sql, name).map do |row|
-          (0...(row.size / 2)).map { |i| row[i] }
-        end
+        exec(sql, name).rows
       end
 
       def begin_db_transaction #:nodoc:
@@ -199,7 +197,7 @@ module ActiveRecord
           WHERE type = 'table' AND NOT name = 'sqlite_sequence'
         SQL
 
-        execute(sql, name).map do |row|
+        exec(sql, name).map do |row|
           row['name']
         end
       end
-- 
cgit v1.2.3