Class: Sequel::SQL::JoinClause

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

Overview

Represents an SQL JOIN clause, used for joining tables.

Direct Known Subclasses

JoinOnClause, JoinUsingClause

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Expression

#lit

Constructor Details

#initialize(join_type, table, table_alias = nil) ⇒ JoinClause

Create an object with the given join_type, table, and table alias


612
613
614
# File 'lib/sequel/lib/sequel/sql.rb', line 612

def initialize(join_type, table, table_alias = nil)
  @join_type, @table, @table_alias = join_type, table, table_alias
end

Instance Attribute Details

#join_typeObject (readonly)

The type of join to do


603
604
605
# File 'lib/sequel/lib/sequel/sql.rb', line 603

def join_type
  @join_type
end

#tableObject (readonly)

The actual table to join


606
607
608
# File 'lib/sequel/lib/sequel/sql.rb', line 606

def table
  @table
end

#table_aliasObject (readonly)

The table alias to use for the join, if any


609
610
611
# File 'lib/sequel/lib/sequel/sql.rb', line 609

def table_alias
  @table_alias
end