Class: Sequel::SQL::AliasedExpression

Inherits:
Expression show all
Defined in:
lib/sequel/lib/sequel/sql.rb

Overview

Represents an aliasing of an expression/column to a given name.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Expression

#lit

Constructor Details

#initialize(expression, aliaz) ⇒ AliasedExpression

Create an object with the given expression and alias.



384
385
386
# File 'lib/sequel/lib/sequel/sql.rb', line 384

def initialize(expression, aliaz)
  @expression, @aliaz = expression, aliaz
end

Instance Attribute Details

#aliazObject (readonly)

The alias to use for the expression, not alias since that is a keyword in ruby.



381
382
383
# File 'lib/sequel/lib/sequel/sql.rb', line 381

def aliaz
  @aliaz
end

#expressionObject (readonly)

The expression to alias



377
378
379
# File 'lib/sequel/lib/sequel/sql.rb', line 377

def expression
  @expression
end