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 1548 def initialize(join_type, table_expr) 1549 @join_type = join_type 1550 @table_expr = table_expr 1551 freeze 1552 end
Create an object with the given join_type
and table expression.
Public Instance Methods
Source
# File lib/sequel/sql.rb 1573 def column_aliases 1574 if @table_expr.is_a?(AliasedExpression) 1575 @table_expr.columns 1576 end 1577 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 1555 def table 1556 if @table_expr.is_a?(AliasedExpression) 1557 @table_expr.expression 1558 else 1559 @table_expr 1560 end 1561 end
The table/set related to the JOIN, without any alias.
Source
# File lib/sequel/sql.rb 1565 def table_alias 1566 if @table_expr.is_a?(AliasedExpression) 1567 @table_expr.alias 1568 end 1569 end
The table alias to use for the JOIN , or nil if the JOIN does not alias the table.