module ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods

Public Instance Methods

fetch_primary_and_parent_key() click to toggle source
# File lib/activerecord_spanner_adapter/primary_key.rb, line 20
def fetch_primary_and_parent_key
  return connection.schema_cache.primary_and_parent_keys table_name \
    if ActiveRecord::Base != self && table_exists?
end
primary_and_parent_key() click to toggle source
# File lib/activerecord_spanner_adapter/primary_key.rb, line 11
def primary_and_parent_key
  reset_primary_and_parent_key unless defined? @primary_and_parent_key
  @primary_and_parent_key
end
primary_and_parent_key=(value) click to toggle source
# File lib/activerecord_spanner_adapter/primary_key.rb, line 25
def primary_and_parent_key= value
  @primary_and_parent_key = value
end
reset_primary_and_parent_key() click to toggle source
# File lib/activerecord_spanner_adapter/primary_key.rb, line 16
def reset_primary_and_parent_key
  self.primary_and_parent_key = base_class? ? fetch_primary_and_parent_key : base_class.primary_and_parent_key
end