class Sequel::SQL::JoinClause
Represents an SQL
JOIN clause, used for joining tables.
Attributes
The type of join to do
The expression representing the table/set related to the JOIN. Is an AliasedExpression
if the JOIN uses an alias.
Public Class Methods
Source
# File lib/sequel/sql.rb 1542 def initialize(join_type, table_expr) 1543 @join_type = join_type 1544 @table_expr = table_expr 1545 freeze 1546 end
Create an object with the given join_type
and table expression.
Public Instance Methods
Source
# File lib/sequel/sql.rb 1567 def column_aliases 1568 if @table_expr.is_a?(AliasedExpression) 1569 @table_expr.columns 1570 end 1571 end
The column aliases to use for the JOIN , or nil if the JOIN does not use a derived column list.
Source
# File lib/sequel/sql.rb 1549 def table 1550 if @table_expr.is_a?(AliasedExpression) 1551 @table_expr.expression 1552 else 1553 @table_expr 1554 end 1555 end
The table/set related to the JOIN, without any alias.
Source
# File lib/sequel/sql.rb 1559 def table_alias 1560 if @table_expr.is_a?(AliasedExpression) 1561 @table_expr.alias 1562 end 1563 end
The table alias to use for the JOIN , or nil if the JOIN does not alias the table.