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



                                      

                                                                  
       
 

                                            
       



                            



                        

     
module Arel
  ###
  # Methods for creating various nodes
  module FactoryMethods
    def create_join to, constraint = nil, klass = Nodes::InnerJoin
      klass.new(to, constraint)
    end

    def create_string_join to
      create_join to, nil, Nodes::StringJoin
    end

    def create_and clauses
      Nodes::And.new clauses
    end

    def create_on expr
      Nodes::On.new expr
    end
  end
end