On May 27, 11:32 am, NJChoo <[email protected]> wrote: > Using Sequel 3.4.0 - > > User.db.transaction(:server => :default) { > puts User.filter(:id => xxxx).map(:catch_phrase) > > } > > Simple example... (going to read then write on master) seems to be > still reading from the :read_only DB instead of the :default... how is > this done?
You need to use: puts User.filter(:id => xxxx).server(:default).map(:catch_phrase) Sequel allows you to have a transaction open on one shard while running code on another shard, which is what you were asking it to do (since the default for selects is :read_only). Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en.
