Flowdock
method

get_advisory_lock

Importance_0
v5.0.0.1 - Show latest stable - 0 notes - Class: ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
get_advisory_lock(lock_id) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 318
      def get_advisory_lock(lock_id) # :nodoc:
        unless lock_id.is_a?(Integer) && lock_id.bit_length <= 63
          raise(ArgumentError, "Postgres requires advisory lock ids to be a signed 64 bit integer")
        end
        select_value("SELECT pg_try_advisory_lock(#{lock_id});")
      end
Register or log in to add new notes.