diff options
author | Jeremy Daer <jeremydaer@gmail.com> | 2016-04-23 21:26:33 -0700 |
---|---|---|
committer | Jeremy Daer <jeremydaer@gmail.com> | 2016-04-23 21:26:33 -0700 |
commit | 7c45fa57a111359cfa9227b2a54ec2dd31a9f7ec (patch) | |
tree | 2e5187243175f86d290f22862553c299c856bbde | |
parent | 77cd14bbbf32f5be55f8e160e34876e89527b7bc (diff) | |
parent | c1ab4a2dbf89a52d90318323885834008aff3007 (diff) | |
download | rails-7c45fa57a111359cfa9227b2a54ec2dd31a9f7ec.tar.gz rails-7c45fa57a111359cfa9227b2a54ec2dd31a9f7ec.tar.bz2 rails-7c45fa57a111359cfa9227b2a54ec2dd31a9f7ec.zip |
Merge pull request #24708 from kamipo/move_select_rows_implementation_to_super_class
Move `select_rows` implementation to super class
-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 cc33af25f6..d45c2c0b0d 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 |