Class: Sequel::SQL::AliasedExpression
- Inherits:
-
Expression
- Object
- Expression
- Sequel::SQL::AliasedExpression
- Defined in:
- lib/sequel/sql.rb
Overview
Represents an aliasing of an expression to a given alias.
Instance Attribute Summary collapse
-
#aliaz ⇒ Object
(also: #alias)
readonly
The alias to use for the expression, not
alias
since that is a keyword in ruby. -
#columns ⇒ Object
readonly
The columns aliases to use, for when the aliased expression is a record or set of records (such as a dataset).
-
#expression ⇒ Object
readonly
The expression to alias.
Instance Method Summary collapse
-
#initialize(expression, aliaz, columns = nil) ⇒ AliasedExpression
constructor
Create an object with the given expression and alias.
Methods inherited from Expression
#==, attr_reader, #eql?, #hash, inherited, #inspect, #lit, #sql_literal
Constructor Details
#initialize(expression, aliaz, columns = nil) ⇒ AliasedExpression
Create an object with the given expression and alias.
1015 1016 1017 1018 1019 |
# File 'lib/sequel/sql.rb', line 1015 def initialize(expression, aliaz, columns=nil) @expression = expression @aliaz = aliaz @columns = columns end |
Instance Attribute Details
#aliaz ⇒ Object (readonly) Also known as: alias
The alias to use for the expression, not alias
since that is a keyword in ruby.
1007 1008 1009 |
# File 'lib/sequel/sql.rb', line 1007 def aliaz @aliaz end |
#columns ⇒ Object (readonly)
The columns aliases to use, for when the aliased expression is a record or set of records (such as a dataset).
1012 1013 1014 |
# File 'lib/sequel/sql.rb', line 1012 def columns @columns end |
#expression ⇒ Object (readonly)
The expression to alias
1003 1004 1005 |
# File 'lib/sequel/sql.rb', line 1003 def expression @expression end |