aboutsummaryrefslogblamecommitdiffstats
path: root/lib/arel/nodes/unary.rb
blob: 5c4add4792b4c4665a75da64741b8041b956b9a7 (plain) (tree)
1
2
3
4
5
6
7
8
9
10



                                   
                        




                         

       
         

              
            


            
        
         
          
                


                                       

     
module Arel
  module Nodes
    class Unary < Arel::Nodes::Node
      attr_accessor :expr
      alias :value :expr

      def initialize expr
        @expr = expr
      end
    end

    %w{
      Bin
      Group
      Grouping
      Having
      Limit
      Not
      Offset
      On
      Top
      Lock
      DistinctOn
    }.each do |name|
      const_set(name, Class.new(Unary))
    end
  end
end