Class: Symbol

Class | Symbol
In: | lib/sequel/core_sql.rb
Parent: | Object

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

### Methods

* [] sql_function

### Included Modules

Sequel::SQL::QualifyingMethods Sequel::SQL::IdentifierMethods Sequel::SQL::AliasMethods Sequel::SQL::CastMethods Sequel::SQL::OrderMethods Sequel::SQL::BooleanMethods Sequel::SQL::NumericMethods Sequel::SQL::StringMethods Sequel::SQL::SubscriptMethods Sequel::SQL::ComplexExpressionMethods Sequel::SQL::InequalityMethods

### Public Instance methods

*(ce=(arg=false;

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

[Source]

         # File lib/sequel/core_sql.rb, line 224
    224:   def *(ce=(arg=false;nil))
    225:     return super(ce) unless arg == false
    226:     Sequel::SQL::ColumnAll.new(self);
    227:   end

[](*args)

Alias for sql_function

sql_function(*args)

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)

[Source]

         # File lib/sequel/core_sql.rb, line 237
    237:   def sql_function(*args)
    238:     Sequel::SQL::Function.new(self, *args)
    239:   end

[Validate]