Method: Sequel::Dataset#server

Defined in:
lib/sequel/dataset/query.rb

#server(servr) ⇒ Object

Set the server for this dataset to use. Used to pick a specific database shard to run a query against, or to override the default (where SELECT uses :read_only database and all other queries use the :default database). This method is always available but is only useful when database sharding is being used.

DB[:items].all # Uses the :read_only or :default server 
DB[:items].delete # Uses the :default server
DB[:items].server(:blah).delete # Uses the :blah server

998
999
1000
# File 'lib/sequel/dataset/query.rb', line 998

def server(servr)
  clone(:server=>servr)
end