Class: Sequel::SQL::JoinUsingClause

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

Overview

Represents an SQL JOIN table USING (columns) 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(using, *args) ⇒ JoinUsingClause

Create an object with the given conditions and default value.



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

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

Instance Attribute Details

#usingObject (readonly)

The columns that appear both tables that should be equal for the conditions to match.



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

def using
  @using
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.



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

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