Methods

Class Index [+]

Quicksearch

Sequel::Plugins::Sharding::DatasetMethods

Public Instance Methods

server(s) click to toggle source

If a row proc exists on the dataset, replace it with one that calls the previous row_proc, but calls set_server on the output of that row_proc, ensuring that objects retrieved by a specific shard know which shard they are tied to.

    # File lib/sequel/plugins/sharding.rb, line 92
92:         def server(s)
93:           ds = super
94:           if rp = row_proc
95:             ds.row_proc = proc{|r| rp.call(r).set_server(s)}
96:           end
97:           ds
98:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.