Class: Sequel::SQL::Function

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

Instance Method Summary collapse

Methods inherited from Expression

#lit

Constructor Details

#initialize(f, *args) ⇒ Function

Returns a new instance of Function.



86
# File 'lib/sequel/core_sql.rb', line 86

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

Instance Method Details

#to_s(ds) ⇒ Object



88
89
90
91
# File 'lib/sequel/core_sql.rb', line 88

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