Class: Symbol

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

### Methods

* [] sql_function to_column_ref |

### 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::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.

[Source]

         # File lib/sequel_core/core_sql.rb, line 173
    173:   def *(ce=(arg=false;nil))
    174:     return super(ce) unless arg == false
    175:     Sequel::SQL::ColumnAll.new(self);
    176:   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 ruby 1.9 is not being used. ruby 1.9 includes Symbol#[], and Sequel doesn‘t override methods defined by ruby itself.

[Source]

         # File lib/sequel_core/core_sql.rb, line 182
    182:   def sql_function(*args)
    183:     Sequel::SQL::Function.new(self, *args)
    184:   end

to_column_ref(ds)

Delegate the creation of the resulting SQL to the given dataset, since it may be database dependent.

[Source]

         # File lib/sequel_core/core_sql.rb, line 198
    198:   def to_column_ref(ds)
    199:     ds.symbol_to_column_ref(self)
    200:   end

|(sub)

If the given argument is an Integer or an array containing an Integer, returns a Sequel::SQL::Subscript with this column and the given arg. Otherwise returns a Sequel::SQL::BooleanExpression where this column (which should be boolean) or the given argument is true.

[Source]

         # File lib/sequel_core/core_sql.rb, line 191
    191:   def |(sub)
    192:     return super unless (Integer === sub) || ((Array === sub) && sub.any?{|x| Integer === x})
    193:     Sequel::SQL::Subscript.new(self, Array(sub))
    194:   end

[Validate]