mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
d4259c5ce2
* 2-0-stable: updating history Patched Arel v2.0.6 to support MSSQL SQL queries. Based on work of James Abley (https://github.com/jabley/arel). consolidating dot visitor methods refactoring where, fixing subselect implementation for passing a subquery to #in and #not_in tests for passing a subquery to #in and #not_in limit members of the AST are visited quoting limit nodes Conflicts: History.txt lib/arel/nodes.rb lib/arel/nodes/select_core.rb lib/arel/select_manager.rb lib/arel/visitors/to_sql.rb test/visitors/test_to_sql.rb
25 lines
362 B
Ruby
25 lines
362 B
Ruby
module Arel
|
|
module Nodes
|
|
class Unary < Arel::Nodes::Node
|
|
attr_accessor :expr
|
|
alias :value :expr
|
|
|
|
def initialize expr
|
|
@expr = expr
|
|
end
|
|
end
|
|
|
|
%w{
|
|
Group
|
|
Grouping
|
|
Having
|
|
Limit
|
|
Not
|
|
Offset
|
|
On
|
|
Top
|
|
}.each do |name|
|
|
const_set(name, Class.new(Unary))
|
|
end
|
|
end
|
|
end
|