--- !ruby/object:RI::MethodDescription 
aliases: 
- !ruby/object:RI::AliasName 
  name: order_by
block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns a copy of the dataset with the order changed. If a nil is given the returned dataset has no order. This can accept multiple arguments of varying kinds, and even SQL functions. If a block is given, it is treated as a virtual row block, similar to filter.
- !ruby/struct:SM::Flow::VERB 
  body: "  ds.order(:name).sql #=&gt; 'SELECT * FROM items ORDER BY name'\n  ds.order(:a, :b).sql #=&gt; 'SELECT * FROM items ORDER BY a, b'\n  ds.order('a + b'.lit).sql #=&gt; 'SELECT * FROM items ORDER BY a + b'\n  ds.order(:a + :b).sql #=&gt; 'SELECT * FROM items ORDER BY (a + b)'\n  ds.order(:name.desc).sql #=&gt; 'SELECT * FROM items ORDER BY name DESC'\n  ds.order(:name.asc).sql #=&gt; 'SELECT * FROM items ORDER BY name ASC'\n  ds.order{|o| o.sum(:name)}.sql #=&gt; 'SELECT * FROM items ORDER BY sum(name)'\n  ds.order(nil).sql #=&gt; 'SELECT * FROM items'\n"
full_name: Sequel::Dataset#order
is_singleton: false
name: order
params: (*columns, &block)
visibility: public
