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.
59 60 61 62 |
# File 'lib/sequel/plugins/sharding.rb', line 59 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.
66 67 68 69 |
# File 'lib/sequel/plugins/sharding.rb', line 66 def set_server?(s) @server ||= s self end |
#this ⇒ Object
Ensure that the instance dataset is tied to the correct shard.
72 73 74 |
# File 'lib/sequel/plugins/sharding.rb', line 72 def this use_server(super) end |