Module: Octopus::Model::ClassMethods

Includes:
SharedMethods
Defined in:
lib/octopus/model.rb

Instance Method Summary collapse

Methods included from SharedMethods

#clean_table_name, connection_proxy, connection_with_octopus, #hijack_connection, #hijack_initializer, #set_current_shard, should_use_normal_connection?, #using

Instance Method Details

#octopus_establish_connection(spec = nil) ⇒ Object



89
90
91
92
# File 'lib/octopus/model.rb', line 89

def octopus_establish_connection(spec = nil)
  write_inheritable_attribute(:establish_connection, true)      
  establish_connection(spec)
end

#replicated_modelObject



81
82
83
# File 'lib/octopus/model.rb', line 81

def replicated_model()
  write_inheritable_attribute(:replicated, true)
end

#sharded_modelObject



85
86
87
# File 'lib/octopus/model.rb', line 85

def sharded_model()
  write_inheritable_attribute(:sharded, true)      
end