Class: Sequel::SQL::QualifiedColumnRef
- Inherits:
-
Expression
- Object
- Expression
- Sequel::SQL::QualifiedColumnRef
- Defined in:
- lib/sequel_core/sql.rb
Overview
Represents a qualified (column with table) reference. Used when joining tables to disambiguate columns.
Constant Summary
Constants included from ColumnMethods
ColumnMethods::AS, ColumnMethods::ASC, ColumnMethods::DESC
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
The table and column to reference.
-
#table ⇒ Object
readonly
The table and column to reference.
Instance Method Summary collapse
-
#initialize(table, column) ⇒ QualifiedColumnRef
constructor
Set the attributes to the given arguments.
-
#to_s(ds) ⇒ Object
Delegate the creation of the resulting SQL to the given dataset, since it may be database dependent.
Methods inherited from Expression
Methods included from ColumnMethods
Constructor Details
#initialize(table, column) ⇒ QualifiedColumnRef
Set the attributes to the given arguments
455 456 457 |
# File 'lib/sequel_core/sql.rb', line 455 def initialize(table, column) @table, @column = table, column end |
Instance Attribute Details
#column ⇒ Object (readonly)
The table and column to reference
452 453 454 |
# File 'lib/sequel_core/sql.rb', line 452 def column @column end |
#table ⇒ Object (readonly)
The table and column to reference
452 453 454 |
# File 'lib/sequel_core/sql.rb', line 452 def table @table 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.
461 462 463 |
# File 'lib/sequel_core/sql.rb', line 461 def to_s(ds) ds.qualified_column_ref_sql(self) end |