Module Sequel::Plugins::Sharding::DatasetMethods
In: lib/sequel/plugins/sharding.rb

Methods

server  

Public Instance methods

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.

[Source]

     # File lib/sequel/plugins/sharding.rb, line 107
107:         def server(s)
108:           ds = super
109:           if rp = row_proc
110:             ds.row_proc = proc{|r| rp.call(r).set_server(s)}
111:           end
112:           ds
113:         end

[Validate]