diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2016-04-24 11:20:46 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2016-04-24 11:20:46 +0900 |
commit | c1ab4a2dbf89a52d90318323885834008aff3007 (patch) | |
tree | cdc64be37287bf123a260b05eff6d6aad929154a /activerecord | |
parent | 39f1dac9a5700c6601f671fea2e9b68b785c94d2 (diff) | |
download | rails-c1ab4a2dbf89a52d90318323885834008aff3007.tar.gz rails-c1ab4a2dbf89a52d90318323885834008aff3007.tar.bz2 rails-c1ab4a2dbf89a52d90318323885834008aff3007.zip |
Move `select_rows` implementation to super class
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb | 4 |
2 files changed, 1 insertions, 5 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 ddfd97b537..49d54c80ec 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb @@ -66,7 +66,7 @@ module ActiveRecord # Returns an array of arrays containing the field values. # Order is the same as that returned by +columns+. def select_rows(sql, name = nil, binds = []) - raise NotImplementedError + exec_query(sql, name, binds).rows end # Executes the SQL statement in the context of this connection and returns diff --git a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb index bf73d647c0..d64ac434e8 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb @@ -229,10 +229,6 @@ module ActiveRecord log(sql, name) { @connection.execute(sql) } end - def select_rows(sql, name = nil, binds = []) - exec_query(sql, name, binds).rows - end - def begin_db_transaction #:nodoc: log('begin transaction',nil) { @connection.transaction } end |