Class: FunctionCall
- Inherits:
-
Expression
- Object
- Expression
- FunctionCall
- Defined in:
- lib/eno.rb
Instance Attribute Summary
Attributes inherited from Expression
Instance Method Summary collapse
Methods inherited from Expression
#!=, #!@, #%, #&, #*, #+, #-, #/, #<, #<=, #==, #>, #>=, #as, #desc, #initialize, #inner_join, #join, #not_null?, #null?, #over, quote, #|
Constructor Details
This class inherits a constructor from Expression
Instance Method Details
#to_sql ⇒ Object
258 259 260 261 262 263 264 265 |
# File 'lib/eno.rb', line 258 def to_sql fun = @members[0] if @members.size == 2 && Identifier === @members.last && @members.last._empty_placeholder? "#{fun}()" else "#{fun}(#{@members[1..-1].map { |a| Expression.quote(a) }.join(', ')})" end end |