Active Record 连接适配器保存点
方法
实例公有方法
create_savepoint(name = current_savepoint_name) 链接
来源:显示 | 在 GitHub 上
# File activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb, line 11 def create_savepoint(name = current_savepoint_name) internal_execute("SAVEPOINT #{name}", "TRANSACTION") end
current_savepoint_name() 链接
来源:显示 | 在 GitHub 上
# File activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb, line 7 def current_savepoint_name current_transaction.savepoint_name end
exec_rollback_to_savepoint(name = current_savepoint_name) 链接
来源:显示 | 在 GitHub 上
# File activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb, line 15 def exec_rollback_to_savepoint(name = current_savepoint_name) internal_execute("ROLLBACK TO SAVEPOINT #{name}", "TRANSACTION") end
release_savepoint(name = current_savepoint_name) 链接
来源:显示 | 在 GitHub 上
# File activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb, line 19 def release_savepoint(name = current_savepoint_name) internal_execute("RELEASE SAVEPOINT #{name}", "TRANSACTION") end