Represents an SQL JOIN clause, used for joining tables.
Attributes
| join_type | [R] |
The type of join to do |
| table_expr | [R] |
The expression representing the table/set related to the JOIN. Is an |
Public Class methods
new(join_type, table_expr)
Create an object with the given join_type and table expression.
[show source]
# File lib/sequel/sql.rb 1549 def initialize(join_type, table_expr) 1550 @join_type = join_type 1551 @table_expr = table_expr 1552 freeze 1553 end
Public Instance methods
column_aliases()
The column aliases to use for the JOIN , or nil if the JOIN does not use a derived column list.
[show source]
# File lib/sequel/sql.rb 1574 def column_aliases 1575 if @table_expr.is_a?(AliasedExpression) 1576 @table_expr.columns 1577 end 1578 end
table()
The table/set related to the JOIN, without any alias.
[show source]
# File lib/sequel/sql.rb 1556 def table 1557 if @table_expr.is_a?(AliasedExpression) 1558 @table_expr.expression 1559 else 1560 @table_expr 1561 end 1562 end
table_alias()
The table alias to use for the JOIN , or nil if the JOIN does not alias the table.
[show source]
# File lib/sequel/sql.rb 1566 def table_alias 1567 if @table_expr.is_a?(AliasedExpression) 1568 @table_expr.alias 1569 end 1570 end