Module: ActiveRecord::ConnectionAdapters::SQLServer::Savepoints
- Included in:
- ActiveRecord::ConnectionAdapters::SQLServerAdapter
- Defined in:
- lib/active_record/connection_adapters/sqlserver/savepoints.rb
Instance Method Summary collapse
- #create_savepoint(name = current_savepoint_name) ⇒ Object
- #current_savepoint_name ⇒ Object
- #exec_rollback_to_savepoint(name = current_savepoint_name) ⇒ Object
-
#release_savepoint(_name) ⇒ Object
SQL Server does require save-points to be explicitly released.
Instance Method Details
#create_savepoint(name = current_savepoint_name) ⇒ Object
11 12 13 |
# File 'lib/active_record/connection_adapters/sqlserver/savepoints.rb', line 11 def create_savepoint(name = current_savepoint_name) internal_execute("SAVE TRANSACTION #{name}", "TRANSACTION") end |
#current_savepoint_name ⇒ Object
7 8 9 |
# File 'lib/active_record/connection_adapters/sqlserver/savepoints.rb', line 7 def current_savepoint_name current_transaction.savepoint_name end |
#exec_rollback_to_savepoint(name = current_savepoint_name) ⇒ Object
15 16 17 |
# File 'lib/active_record/connection_adapters/sqlserver/savepoints.rb', line 15 def exec_rollback_to_savepoint(name = current_savepoint_name) internal_execute("ROLLBACK TRANSACTION #{name}", "TRANSACTION") end |
#release_savepoint(_name) ⇒ Object
SQL Server does require save-points to be explicitly released. See stackoverflow.com/questions/3101312/sql-server-2008-no-release-savepoint-for-current-transaction
21 22 |
# File 'lib/active_record/connection_adapters/sqlserver/savepoints.rb', line 21 def release_savepoint(_name) end |