Class: Sequel::SQL::JoinOnClause

Inherits:
JoinClause show all
Defined in:
lib/sequel_core/sql.rb

Overview

Represents an SQL JOIN table ON conditions clause.

Instance Attribute Summary collapse

Attributes inherited from JoinClause

#join_type, #table, #table_alias

Instance Method Summary collapse

Methods inherited from Expression

#lit

Constructor Details

#initialize(on, *args) ⇒ JoinOnClause

Create an object with the given conditions and default value.



594
595
596
597
# File 'lib/sequel_core/sql.rb', line 594

def initialize(on, *args)
  @on = on
  super(*args)
end

Instance Attribute Details

#onObject (readonly)

The conditions for the join



590
591
592
# File 'lib/sequel_core/sql.rb', line 590

def on
  @on
end

Instance Method Details

#to_s(ds) ⇒ Object

Delegate the creation of the resulting SQL to the given dataset, since it may be database dependent.



601
602
603
# File 'lib/sequel_core/sql.rb', line 601

def to_s(ds)
  ds.join_on_clause_sql(self)
end