提交 e7648f26 编写于 作者: A Aaron Patterson

adding "orders" method

上级 5eaf76df
......@@ -89,6 +89,10 @@ def order *expr
self
end
def orders
@head.orders
end
def wheres
Compatibility::Wheres.new @engine, @ctx.wheres
end
......
......@@ -73,6 +73,16 @@ def execute sql, name = nil
end
end
describe 'orders' do
it 'returns order clauses' do
table = Table.new :users
manager = Arel::SelectManager.new Table.engine
order = table[:id]
manager.order table[:id]
check manager.orders.should == [order]
end
end
describe 'order' do
it 'generates order clauses' do
table = Table.new :users
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册