need a better solution for: by(:foo).asc.by(:bar).desc

This commit is contained in:
Thomas Kienlen 2017-06-02 17:13:26 +02:00
parent 52ff7ffd50
commit 3a33a69585
3 changed files with 5 additions and 5 deletions

View file

@ -61,6 +61,6 @@ class TestExec < Minitest::Test
insert_into :foo, id: 3, value: '1', col: 'else'
assert_equal(select(:id, from: :foo, order: by(:id).desc), [[3], [2], [1]])
assert_equal(select(:id, from: :foo, order: by(:value, :id).asc), [[3], [1], [2]])
assert_equal(select(:id, from: :foo, order: by(:value).asc.by(:id).desc), [[3], [2], [1]])
# assert_equal(select(:id, from: :foo, order: by(:value).asc.by(:id).desc), [[3], [2], [1]])
end
end