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.



656
657
658
659
# File 'lib/sequel_core/sql.rb', line 656

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

Instance Attribute Details

#onObject (readonly)

The conditions for the join



652
653
654
# File 'lib/sequel_core/sql.rb', line 652

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.



663
664
665
# File 'lib/sequel_core/sql.rb', line 663

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