Parent

Methods

Class Index [+]

Quicksearch

Symbol

Sequel extends Symbol to add methods to implement the SQL DSL.

Public Instance Methods

*(ce=(arg=false; click to toggle source

If no argument is given, returns a Sequel::SQL::ColumnAll object specifying all columns for this table. If an argument is given, returns a Sequel::SQL::NumericExpression using the * (multiplication) operator with this and the given argument.

  :table.* # SQL: table.*
  :column * 2 # SQL: column * 2
     # File lib/sequel/extensions/core_extensions.rb, line 215
215:   def *(ce=(arg=false;nil))
216:     return super(ce) unless arg == false
217:     Sequel::SQL::ColumnAll.new(self);
218:   end
[](*args) click to toggle source
Alias for: sql_function
sql_function(*args) click to toggle source

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 228
228:   def sql_function(*args)
229:     Sequel::SQL::Function.new(self, *args)
230:   end
Also aliased as: []

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.