Module: Switchman::ActiveRecord::AbstractAdapter

Defined in:
lib/switchman/active_record/abstract_adapter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#last_query_atObject (readonly)

Returns the value of attribute last_query_at.



7
8
9
# File 'lib/switchman/active_record/abstract_adapter.rb', line 7

def last_query_at
  @last_query_at
end

#shardObject



9
10
11
# File 'lib/switchman/active_record/abstract_adapter.rb', line 9

def shard
  @shard || Shard.default
end

Instance Method Details

#initialize(*args) ⇒ Object



13
14
15
16
17
# File 'lib/switchman/active_record/abstract_adapter.rb', line 13

def initialize(*args)
  super
  @instrumenter = Switchman::ShardedInstrumenter.new(@instrumenter, self)
  @last_query_at = Time.now
end

#quote_local_table_name(name) ⇒ Object



19
20
21
# File 'lib/switchman/active_record/abstract_adapter.rb', line 19

def quote_local_table_name(name)
  quote_table_name(name)
end