Sequel extends Symbol to add methods to implement the SQL DSL.
# File lib/sequel/deprecated_core_extensions.rb, line 102 def *(ce=(arg=false;nil)) if arg == false Sequel::Deprecation.deprecate('Symbol#*', "Please use Sequel.expr(symbol).* instead, or Sequel.extension(:core_extensions) to continue using it") Sequel::SQL::ColumnAll.new(self) else super(ce) end end
Create an SQL Function with the receiver as the function name and the given arguments.
# File lib/sequel/extensions/ruby18_symbol_extensions.rb, line 19 def [](*args) Sequel::SQL::Function.new(self, *args) end
Returns receiver wrapped in an Sequel::SQL::Identifier. Usually used to prevent splitting the symbol.
:a__b # SQL: "a"."b" :a__b.identifier # SQL: "a__b"
# File lib/sequel/extensions/core_extensions.rb, line 220 def identifier Sequel::SQL::Identifier.new(self) end
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)
# File lib/sequel/extensions/core_extensions.rb, line 232 def sql_function(*args) Sequel::SQL::Function.new(self, *args) end
Generated with the Darkfish Rdoc Generator 2.