Method: Sequel::Dataset#order_append

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

#order_append(*columns, &block) ⇒ Object

Returns a copy of the dataset with the order columns added to the end of the existing order.

DB[:items].order(:a).order(:b) # SELECT * FROM items ORDER BY b
DB[:items].order(:a).order_append(:b) # SELECT * FROM items ORDER BY a, b
[View source]

818
819
820
821
# File 'lib/sequel/dataset/query.rb', line 818

def order_append(*columns, &block)
  columns = @opts[:order] + columns if @opts[:order]
  order(*columns, &block)
end