Class | Symbol |
In: |
lib/sequel_core/core_sql.rb
|
Parent: | Object |
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.
# 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
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.
# File lib/sequel_core/core_sql.rb, line 182 182: def sql_function(*args) 183: Sequel::SQL::Function.new(self, *args) 184: end
Delegate the creation of the resulting SQL to the given dataset, since it may be database dependent.
# File lib/sequel_core/core_sql.rb, line 198 198: def to_column_ref(ds) 199: ds.symbol_to_column_ref(self) 200: end
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.
# 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