Sha256: f4141ec4a192b06115126f788bc855abf3be48d2a10df9e1bb2f4df287600e8e

Contents?: true

Size: 554 Bytes

Versions: 73

Compression:

Stored size: 554 Bytes

Contents

# frozen_string_literal: true

module ActiveRecord
  module ConnectionAdapters
    module Savepoints
      def current_savepoint_name
        current_transaction.savepoint_name
      end

      def create_savepoint(name = current_savepoint_name)
        execute("SAVEPOINT #{name}")
      end

      def exec_rollback_to_savepoint(name = current_savepoint_name)
        execute("ROLLBACK TO SAVEPOINT #{name}")
      end

      def release_savepoint(name = current_savepoint_name)
        execute("RELEASE SAVEPOINT #{name}")
      end
    end
  end
end

Version data entries

73 entries across 73 versions & 7 rubygems

Version Path
activerecord-5.2.6 lib/active_record/connection_adapters/abstract/savepoints.rb
activerecord-6.0.3.7 lib/active_record/connection_adapters/abstract/savepoints.rb
activerecord-5.2.4.6 lib/active_record/connection_adapters/abstract/savepoints.rb
activerecord-6.0.3.6 lib/active_record/connection_adapters/abstract/savepoints.rb
activerecord-5.2.5 lib/active_record/connection_adapters/abstract/savepoints.rb
activerecord-6.0.3.5 lib/active_record/connection_adapters/abstract/savepoints.rb
activerecord-5.2.4.5 lib/active_record/connection_adapters/abstract/savepoints.rb
activerecord-6.0.3.4 lib/active_record/connection_adapters/abstract/savepoints.rb
activerecord-5.2.4.4 lib/active_record/connection_adapters/abstract/savepoints.rb
activerecord-6.0.3.3 lib/active_record/connection_adapters/abstract/savepoints.rb
activerecord-6.0.3.2 lib/active_record/connection_adapters/abstract/savepoints.rb
activerecord-6.0.3.1 lib/active_record/connection_adapters/abstract/savepoints.rb
activerecord-5.2.4.3 lib/active_record/connection_adapters/abstract/savepoints.rb
activerecord-6.0.3 lib/active_record/connection_adapters/abstract/savepoints.rb
activerecord-6.0.3.rc1 lib/active_record/connection_adapters/abstract/savepoints.rb
activerecord-6.0.2.2 lib/active_record/connection_adapters/abstract/savepoints.rb
activerecord-5.2.4.2 lib/active_record/connection_adapters/abstract/savepoints.rb
argon-1.3.1 vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/connection_adapters/abstract/savepoints.rb
symbolic_enum-1.1.5 vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/connection_adapters/abstract/savepoints.rb
activerecord-6.0.2.1 lib/active_record/connection_adapters/abstract/savepoints.rb