class Symbol
Sequel
extends Symbol
to add methods to implement the SQL DSL.
Public Instance Methods
[](v)
click to toggle source
# File lib/sequel/extensions/symbol_aref.rb 44 def [](v) 45 case v 46 when Symbol, Sequel::SQL::Identifier, Sequel::SQL::QualifiedIdentifier 47 Sequel::SQL::QualifiedIdentifier.new(self, v) 48 else 49 aref_before_sequel(v) 50 end 51 end
identifier()
click to toggle source
Returns receiver wrapped in an Sequel::SQL::Identifier
.
:a.identifier # SQL: "a"
# File lib/sequel/extensions/core_extensions.rb 209 def identifier 210 Sequel::SQL::Identifier.new(self) 211 end
sql_function(*args)
click to toggle source
Returns a Sequel::SQL::Function
with this as the function name, and the given arguments.
: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 219 def sql_function(*args) 220 Sequel::SQL::Function.new(self, *args) 221 end