Method: Symbol#sql_function

Defined in:
lib/sequel/core_sql.rb

#sql_function(*args) ⇒ Object Also known as: []

Returns a Sequel::SQL::Function with this as the function name, and the given arguments. This is aliased as Symbol#[] if the RUBY_VERSION is less than 1.9.0. Ruby 1.9 defines Symbol#[], and Sequel doesn’t override methods defined by ruby itself.

:now.sql_function # SQL: now()
:sum.sql_function(:a) # SQL: sum(a)
:concat.sql_function(:a, :b) # SQL: concat(a, b)


237
238
239
# File 'lib/sequel/core_sql.rb', line 237

def sql_function(*args)
  Sequel::SQL::Function.new(self, *args)
end