Module: Sequel::SQL::ColumnMethods
- Defined in:
- lib/sequel/core_sql.rb
Constant Summary collapse
- AS =
'AS'.freeze
- DESC =
'DESC'.freeze
- ASC =
'ASC'.freeze
Instance Method Summary collapse
- #all ⇒ Object (also: #ALL)
- #as(a) ⇒ Object (also: #AS)
- #asc ⇒ Object (also: #ASC)
- #cast_as(t) ⇒ Object
- #desc ⇒ Object (also: #DESC)
Instance Method Details
#all ⇒ Object Also known as: ALL
129 |
# File 'lib/sequel/core_sql.rb', line 129 def all; Sequel::SQL::ColumnAll.new(self); end |
#as(a) ⇒ Object Also known as: AS
120 |
# File 'lib/sequel/core_sql.rb', line 120 def as(a); ColumnExpr.new(self, AS, a); end |
#asc ⇒ Object Also known as: ASC
126 |
# File 'lib/sequel/core_sql.rb', line 126 def asc; ColumnExpr.new(self, ASC); end |
#cast_as(t) ⇒ Object
132 133 134 135 136 137 |
# File 'lib/sequel/core_sql.rb', line 132 def cast_as(t) if t.is_a?(Symbol) t = t.to_s.lit end Sequel::SQL::Function.new(:cast, self.as(t)) end |
#desc ⇒ Object Also known as: DESC
123 |
# File 'lib/sequel/core_sql.rb', line 123 def desc; ColumnExpr.new(self, DESC); end |