From 69cb942d9b72d9a18f8d00c5887f2532bdda0a0f Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 19 Dec 2004 16:21:55 +0000 Subject: 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 --- .../lib/active_record/connection_adapters/abstract_adapter.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb') 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: -- cgit v1.2.3