Sha256: 512a776b0e9c0802fdad244eb6919f6d01a28ea4e0ab467b9c1a9b2ecf27d1f4

Contents?: true

Size: 712 Bytes

Versions: 1

Compression:

Stored size: 712 Bytes

Contents

# frozen_string_literal: true

module MigrationTimeouts
  module MigrationExtensions
    attr_accessor(
      :lock_timeout_disabled,
      :statement_timeout_disabled,
      :lock_timeout_override,
      :statement_timeout_override,
    )

    def disable_lock_timeout!
      self.lock_timeout_disabled = true
    end

    def disable_statement_timeout!
      self.statement_timeout_disabled = true
    end

    def disable_timeouts!
      self.lock_timeout_disabled = true
      self.statement_timeout_disabled = true
    end

    def lock_timeout(seconds)
      self.lock_timeout_override = seconds
    end

    def statement_timeout(seconds)
      self.statement_timeout_override = seconds
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
migration_timeouts-0.0.1 lib/migration_timeouts/migration_extensions.rb