Class Index [+]

Quicksearch

Sequel::Plugins::Sharding::InstanceMethods

Public Instance Methods

set_server?(s) click to toggle source

Set the server that this object is tied to, unless it has already been set. Returns self.

    # File lib/sequel/plugins/sharding.rb, line 61
61:         def set_server?(s)
62:           @server ||= s
63:           self
64:         end

Private Instance Methods

_apply_association_options(*args) click to toggle source

Ensure that association datasets are tied to the correct shard.

    # File lib/sequel/plugins/sharding.rb, line 69
69:         def _apply_association_options(*args)
70:           use_server(super)
71:         end
_join_table_dataset(opts) click to toggle source

Ensure that the join table for many_to_many associations uses the correct shard.

    # File lib/sequel/plugins/sharding.rb, line 74
74:         def _join_table_dataset(opts)
75:           use_server(super)
76:         end
ensure_associated_primary_key(opts, o, *args) click to toggle source

If creating the object by doing add_association for a many_to_many association, make sure the associated object is created on the current object’s shard, unless the passed object already has an assigned shard.

    # File lib/sequel/plugins/sharding.rb, line 81
81:         def ensure_associated_primary_key(opts, o, *args)
82:           o.set_server?(@server) if o.respond_to?(:set_server?)
83:           super
84:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.