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 1553 def initialize(join_type, table_expr) 1554 @join_type = join_type 1555 @table_expr = table_expr 1556 freeze 1557 end
Create an object with the given join_type and table expression.
Public Instance Methods
Source
# File lib/sequel/sql.rb 1578 def column_aliases 1579 if @table_expr.is_a?(AliasedExpression) 1580 @table_expr.columns 1581 end 1582 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 1560 def table 1561 if @table_expr.is_a?(AliasedExpression) 1562 @table_expr.expression 1563 else 1564 @table_expr 1565 end 1566 end
The table/set related to the JOIN, without any alias.
Source
# File lib/sequel/sql.rb 1570 def table_alias 1571 if @table_expr.is_a?(AliasedExpression) 1572 @table_expr.alias 1573 end 1574 end
The table alias to use for the JOIN , or nil if the JOIN does not alias the table.