File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
lib/active_record/connection_adapters Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 11
22MASTER
33
4+ * Rails2.3 - Implement new savepoint support [Ken Collins]
5+ http://rails.lighthouseapp.com/projects/8994/tickets/383
6+ http://www.codeproject.com/KB/database/sqlservertransactions.aspx
7+
48* Rails2.3 - Coerce NestedScopingTest#test_merged_scoped_find to use correct regexp for adapter. [Ken Collins]
59
610* Rails2.3 - Implement a custom ActiveRecord::Associations::ClassMethods::JoinDependency::JoinAssociation#aliased_table_name_for
Original file line number Diff line number Diff line change @@ -189,6 +189,10 @@ def supports_ddl_transactions?
189189 true
190190 end
191191
192+ def supports_savepoints?
193+ true
194+ end
195+
192196 def database_version
193197 @database_version ||= info_schema_query { select_value ( 'SELECT @@version' ) }
194198 end
@@ -358,6 +362,17 @@ def rollback_db_transaction
358362 do_execute "ROLLBACK TRANSACTION" rescue nil
359363 end
360364
365+ def create_savepoint
366+ do_execute "SAVE TRANSACTION #{ current_savepoint_name } "
367+ end
368+
369+ def release_savepoint
370+ end
371+
372+ def rollback_to_savepoint
373+ do_execute "ROLLBACK TRANSACTION #{ current_savepoint_name } "
374+ end
375+
361376 def add_limit_offset! ( sql , options )
362377 # Validate and/or convert integers for :limit and :offets options.
363378 if options [ :offset ]
You can’t perform that action at this time.
0 commit comments