Module: Sequel::Plugins::Sharding::InstanceMethods
- Defined in:
- lib/sequel/plugins/sharding.rb
Instance Method Summary collapse
-
#set_server(s) ⇒ Object
Set the shard that this object is tied to.
-
#set_server?(s) ⇒ Boolean
Set the server that this object is tied to, unless it has already been set.
-
#this ⇒ Object
Ensure that the instance dataset is tied to the correct shard.
Instance Method Details
#set_server(s) ⇒ Object
Set the shard that this object is tied to. Returns self.
47 48 49 50 |
# File 'lib/sequel/plugins/sharding.rb', line 47 def set_server(s) @server = s self end |
#set_server?(s) ⇒ Boolean
Set the server that this object is tied to, unless it has already been set. Returns self.
54 55 56 57 |
# File 'lib/sequel/plugins/sharding.rb', line 54 def set_server?(s) @server ||= s self end |
#this ⇒ Object
Ensure that the instance dataset is tied to the correct shard.
60 61 62 |
# File 'lib/sequel/plugins/sharding.rb', line 60 def this use_server(super) end |