Method: InterMine::PathQuery::Query#sortOrder=

Defined in:
lib/intermine/query.rb

#sortOrder=(so) ⇒ Object

Set the sort order completely, replacing the current sort order.

query.sortOrder = "Gene.length asc Gene.proteins.length desc"

The sort order expression will be parsed and checked for conformity with the current state of the query.



736
737
738
739
740
741
742
743
744
745
# File 'lib/intermine/query.rb', line 736

def sortOrder=(so)
    if so.is_a?(Array)
        sos = so
    else
        sos = so.split(/(ASC|DESC|asc|desc)/).map {|x| x.strip}.every(2)
    end
    sos.each do |args|
        add_sort_order(*args)
    end
end