Class: Sequel::SQL::ColumnAll
- Inherits:
-
SpecificExpression
- Object
- Expression
- SpecificExpression
- Sequel::SQL::ColumnAll
- Defined in:
- lib/sequel_core/sql.rb
Overview
Represents all columns in a given table, table.* in SQL
Instance Attribute Summary collapse
-
#table ⇒ Object
readonly
The table containing the columns being selected.
Instance Method Summary collapse
-
#==(x) ⇒ Object
ColumnAll expressions are considered equivalent if they have the same class and string representation.
-
#initialize(table) ⇒ ColumnAll
constructor
Create an object with the given table.
-
#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
Constructor Details
#initialize(table) ⇒ ColumnAll
Create an object with the given table
507 508 509 |
# File 'lib/sequel_core/sql.rb', line 507 def initialize(table) @table = table end |
Instance Attribute Details
#table ⇒ Object (readonly)
The table containing the columns being selected
504 505 506 |
# File 'lib/sequel_core/sql.rb', line 504 def table @table end |
Instance Method Details
#==(x) ⇒ Object
ColumnAll expressions are considered equivalent if they have the same class and string representation
513 514 515 |
# File 'lib/sequel_core/sql.rb', line 513 def ==(x) x.class == self.class && @table == x.table end |
#to_s(ds) ⇒ Object
Delegate the creation of the resulting SQL to the given dataset, since it may be database dependent.
519 520 521 |
# File 'lib/sequel_core/sql.rb', line 519 def to_s(ds) ds.column_all_sql(self) end |