Class: Sequel::SQL::AliasedExpression

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

Overview

Represents an aliasing of an expression to a given alias.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Expression

#==, attr_reader, #eql?, #hash, inherited, #inspect, #lit, #sql_literal

Constructor Details

#initialize(expression, aliaz) ⇒ AliasedExpression

Create an object with the given expression and alias.



944
945
946
# File 'lib/sequel/sql.rb', line 944

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

Instance Attribute Details

#aliazObject (readonly) Also known as: alias

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



940
941
942
# File 'lib/sequel/sql.rb', line 940

def aliaz
  @aliaz
end

#expressionObject (readonly)

The expression to alias



936
937
938
# File 'lib/sequel/sql.rb', line 936

def expression
  @expression
end