instance method outside_transaction?

Ruby on Rails 3.1.12

Since v2.3.18 Last seen in v3.2.22.5

Available in: v2.3.18 v3.0.20 v3.1.12 v3.2.22.5

Signature

outside_transaction?()

Checks whether there is currently no transaction active. This is done by querying the database driver, and does not use the transaction house-keeping information recorded by #increment_open_transactions and friends.

Returns true if there is no transaction active, false if there is a transaction active, and nil if this information is unknown.

Not all adapters supports transaction state introspection. Currently, only the PostgreSQL adapter supports this.

Source
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 116
      def outside_transaction?
        nil
      end

Defined in activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb line 116 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::ConnectionAdapters::DatabaseStatements

Type at least 2 characters to search.

↑↓ navigate · open · esc close