Class: Sequel::SQL::ColumnAll

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

Overview

Represents all columns in a given table, table.* in SQL

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Expression

#lit

Constructor Details

#initialize(table) ⇒ ColumnAll

Create an object with the given table


509
510
511
# File 'lib/sequel/lib/sequel/sql.rb', line 509

def initialize(table)
  @table = table
end

Instance Attribute Details

#tableObject (readonly)

The table containing the columns being selected


506
507
508
# File 'lib/sequel/lib/sequel/sql.rb', line 506

def table
  @table
end

Instance Method Details

#==(x) ⇒ Object

ColumnAll expressions are considered equivalent if they have the same class and string representation


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

def ==(x)
  x.class == self.class and @table == x.table
end