Class: ActiveRecord::AdvisoryLockBase

Inherits:
Base
  • Object
show all
Defined in:
lib/active_record/advisory_lock_base.rb

Overview

This class is used to create a connection that we can use for advisory locks. This will take out a “global” lock that can’t be accidentally removed if a new connection is established during a migration.

Constant Summary

Constants included from ConnectionHandling

ConnectionHandling::DEFAULT_ENV, ConnectionHandling::ER_BAD_DB_ERROR, ConnectionHandling::RAILS_ENV

Constants included from Querying

Querying::QUERYING_METHODS

Constants included from Transactions

Transactions::ACTIONS

Constants included from Callbacks

Callbacks::CALLBACKS

Constants included from AttributeMethods

ActiveRecord::AttributeMethods::RESTRICTED_CLASS_METHODS

Instance Attribute Summary

Attributes included from ConnectionHandling

#connection_specification_name

Class Method Summary collapse

Methods included from ConnectionHandling

#clear_cache!, #clear_query_caches_for_current_thread, #connected?, #connected_to, #connected_to?, #connection, #connection_config, #connection_pool, #connects_to, #current_role, #establish_connection, #lookup_connection_handler, #mysql2_connection, #postgresql_connection, #primary_class?, #remove_connection, #resolve_config_for_connection, #retrieve_connection, #sqlite3_connection, #with_handler

Methods included from QueryCache::ClassMethods

#cache, #uncached

Methods included from Querying

#count_by_sql, #find_by_sql

Methods included from Translation

#i18n_scope, #lookup_ancestors

Methods included from Explain

#collecting_queries_for_explain, #exec_explain

Methods included from Enum

#enum, extended, #inherited

Methods included from Delegation::DelegateCache

#generate_relation_method, #inherited, #initialize_relation_delegate_cache, #relation_delegate_class

Methods included from ActiveRecord::Aggregations::ClassMethods

#composed_of

Methods included from Suppressor

#save, #save!

Methods included from Serialization

#serializable_hash

Methods included from Reflection

add_aggregate_reflection, add_reflection, create

Methods included from NoTouching

applied_to?, apply_to, #no_touching?, #touch, #touch_later

Methods included from TouchLater

#touch, #touch_later

Methods included from Transactions

#before_committed!, #committed!, #destroy, #rolledback!, #save, #save!, #touch, #transaction, #trigger_transactional_callbacks?, #with_transaction_returning_status

Methods included from NestedAttributes

#_destroy

Methods included from AutosaveAssociation

#changed_for_autosave?, #destroyed_by_association, #destroyed_by_association=, #mark_for_destruction, #marked_for_destruction?, #reload

Methods included from Associations

#association, #association_cached?, eager_load!, #initialize_dup, #reload

Methods included from Timestamp

#initialize_dup

Methods included from Callbacks

#destroy, #increment!, #touch

Methods included from AttributeMethods

#[], #[]=, #accessed_fields, #attribute_for_inspect, #attribute_names, #attribute_present?, #attributes, #has_attribute?, #respond_to?

Methods included from Locking::Pessimistic

#lock!, #with_lock

Methods included from Locking::Optimistic

#increment!, #locking_enabled?

Methods included from Validations

#save, #save!, #valid?

Methods included from Integration

#cache_key, #cache_key_with_version, #cache_version, #to_param

Methods included from Scoping

#initialize_internals_callback, #populate_with_current_scope_attributes

Methods included from Inheritance

#initialize_dup

Methods included from ModelSchema

derive_join_table_name

Methods included from Persistence

#becomes, #becomes!, #decrement, #decrement!, #delete, #destroy, #destroy!, #destroyed?, #increment, #increment!, #new_record?, #persisted?, #reload, #save, #save!, #toggle, #toggle!, #touch, #update, #update!, #update_attribute, #update_column, #update_columns

Methods included from Core

#<=>, #==, #blank?, #connection_handler, #encode_with, #freeze, #frozen?, #hash, #init_with, #init_with_attributes, #initialize, #initialize_dup, #inspect, #present?, #pretty_print, #readonly!, #readonly?, #slice

Class Method Details

._internal?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/active_record/advisory_lock_base.rb', line 13

def _internal?
  true
end