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, comparison_attrs, #eql?, #hash, #inspect, #lit, #sql_literal, to_s_method

Constructor Details

- (AliasedExpression) initialize(expression, aliaz)

Create an object with the given expression and alias.



521
522
523
# File 'lib/sequel/sql.rb', line 521

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

Instance Attribute Details

- (Object) aliaz (readonly)

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



518
519
520
# File 'lib/sequel/sql.rb', line 518

def aliaz
  @aliaz
end

- (Object) expression (readonly)

The expression to alias



514
515
516
# File 'lib/sequel/sql.rb', line 514

def expression
  @expression
end