On Saturday, November 12, 2016 at 12:14:37 AM UTC-8, 金华 wrote:
>
> I have a lot of database self define fuction
> when i decide to use sequel read_only server
> I find that run select database function sql use the slave server
> This is my code
>
> result = DB["SELECT  create_order(1,2,3,4)"]
>

If you want to specify the server to run on, you can do:

  result = DB["SELECT  create_order(1,2,3,4)"].server(:default)

See http://sequel.jeremyevans.net/rdoc/files/doc/sharding_rdoc.html

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to