Class: Sequel::SQL::Function

Inherits:
Expression show all
Defined in:
lib/sequel_core/core_sql.rb

Instance Method Summary collapse

Methods inherited from Expression

#lit

Constructor Details

#initialize(f, *args) ⇒ Function

Returns a new instance of Function.



94
# File 'lib/sequel_core/core_sql.rb', line 94

def initialize(f, *args); @f, @args = f, args; end

Instance Method Details

#to_s(ds) ⇒ Object



96
97
98
99
# File 'lib/sequel_core/core_sql.rb', line 96

def to_s(ds)
  args = @args.empty? ? '' : ds.literal(@args)
  "#{@f}(#{args})"
end