On Oct 18, 8:32 am, Gary Doades <[email protected]> wrote: > Aha.. If I specify the servers hash in the form: > > {:dsn1=>{:database=>'dsn1', :user => 'sa', :password => 'test'}, > :dsn2=>{:database=>'dsn2', :user => 'sa', :password => 'test'}} > > Then it seems to work OK for all shards. > > It seems it's the :uri form that doesn't work with sharding, although > it works perfectly well for a single database connection.
You don't need to add the :user and :password entries if they are the same as the default. The values of the :servers hash are merged into the default server options. The sharding documentation (http:// sequel.rubyforge.org/rdoc/files/doc/sharding_rdoc.html) specifically mentions the values need to be hashes or procs that return hashes, but it doesn't mention that the values are merged with the default options. I'll fix that. Thanks, 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.
