Class: Sequel::SQL::QualifiedIdentifier
- Inherits:
-
GenericExpression
- Object
- Expression
- GenericExpression
- Sequel::SQL::QualifiedIdentifier
- Defined in:
- lib/sequel_core/sql.rb
Overview
Represents a qualified (column with table) reference. Used when joining tables to disambiguate columns.
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) ⇒ QualifiedIdentifier
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 included from ComplexExpressionMethods
#extract, #sql_boolean, #sql_number, #sql_string
Methods included from StringMethods
Methods included from BooleanMethods
Methods included from OrderMethods
Methods included from CastMethods
#cast, #cast_numeric, #cast_string
Methods included from AliasMethods
Methods inherited from Expression
Constructor Details
#initialize(table, column) ⇒ QualifiedIdentifier
Set the attributes to the given arguments
662 663 664 |
# File 'lib/sequel_core/sql.rb', line 662 def initialize(table, column) @table, @column = table, column end |
Instance Attribute Details
#column ⇒ Object (readonly)
The table and column to reference
659 660 661 |
# File 'lib/sequel_core/sql.rb', line 659 def column @column end |
#table ⇒ Object (readonly)
The table and column to reference
659 660 661 |
# File 'lib/sequel_core/sql.rb', line 659 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.
668 669 670 |
# File 'lib/sequel_core/sql.rb', line 668 def to_s(ds) ds.qualified_identifier_sql(self) end |