Class: Sequel::SQL::JoinClause

Inherits:
Expression show all
Defined in:
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

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

Constructor Details

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

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



1133
1134
1135
# File 'lib/sequel/sql.rb', line 1133

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



1124
1125
1126
# File 'lib/sequel/sql.rb', line 1124

def join_type
  @join_type
end

#tableObject (readonly)

The actual table to join



1127
1128
1129
# File 'lib/sequel/sql.rb', line 1127

def table
  @table
end

#table_aliasObject (readonly)

The table alias to use for the join, if any



1130
1131
1132
# File 'lib/sequel/sql.rb', line 1130

def table_alias
  @table_alias
end