Class: VORuby::ADQL::GroupBy
- Defined in:
- lib/voruby/adql/adql.rb,
lib/voruby/adql/transforms.rb
Overview
Represents the Group By expression part of a query.
Instance Attribute Summary collapse
-
#columns ⇒ Object
Returns the value of attribute columns.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(columns) ⇒ GroupBy
constructor
A new instance of GroupBy.
- #to_adqls ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(columns) ⇒ GroupBy
Returns a new instance of GroupBy.
1993 1994 1995 |
# File 'lib/voruby/adql/adql.rb', line 1993 def initialize(columns) self.columns = columns end |
Instance Attribute Details
#columns ⇒ Object
Returns the value of attribute columns.
1991 1992 1993 |
# File 'lib/voruby/adql/adql.rb', line 1991 def columns @columns end |
Class Method Details
Instance Method Details
#to_adqls ⇒ Object
385 386 387 388 |
# File 'lib/voruby/adql/transforms.rb', line 385 def to_adqls cols = self.columns.collect{|x| x.to_adqls}.join(', ') "GROUP BY #{cols}" end |
#to_s ⇒ Object
2007 2008 2009 2010 |
# File 'lib/voruby/adql/adql.rb', line 2007 def to_s cols = self.columns.collect{|x| x.to_s}.join('|') "{columns=#{cols}}" end |