diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-19 16:21:55 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-19 16:21:55 +0000 |
commit | 69cb942d9b72d9a18f8d00c5887f2532bdda0a0f (patch) | |
tree | 309f72ad492f052ed7f8cf57b067bd618f59da60 /activerecord/lib/active_record/connection_adapters/abstract_adapter.rb | |
parent | 88192b9b1be2bd0729073c899df42a789f264993 (diff) | |
download | rails-69cb942d9b72d9a18f8d00c5887f2532bdda0a0f.tar.gz rails-69cb942d9b72d9a18f8d00c5887f2532bdda0a0f.tar.bz2 rails-69cb942d9b72d9a18f8d00c5887f2532bdda0a0f.zip |
Changed the interface on AbstractAdapter to require that adapters return the number of affected rows on delete and update operations. Added that Base.update_all and Base.delete_all return an integer of the number of affected rows #341
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@228 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb')
-rwxr-xr-x | activerecord/lib/active_record/connection_adapters/abstract_adapter.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb index 66b5962b18..b521a0fdf8 100755 --- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb @@ -285,10 +285,10 @@ module ActiveRecord # Returns the last auto-generated ID from the affected table. def insert(sql, name = nil, pk = nil, id_value = nil) end - # Executes the update statement. + # Executes the update statement and returns the number of rows affected. def update(sql, name = nil) end - # Executes the delete statement. + # Executes the delete statement and returns the number of rows affected. def delete(sql, name = nil) end def reset_runtime # :nodoc: |