Class: Rusql::GroupConcatFunctionSelector
- Defined in:
- lib/rusql/group_concat_function_selector.rb
Instance Attribute Summary collapse
-
#field ⇒ Object
readonly
Returns the value of attribute field.
Instance Method Summary collapse
-
#initialize(field) ⇒ GroupConcatFunctionSelector
constructor
A new instance of GroupConcatFunctionSelector.
- #to_s ⇒ Object
Methods inherited from Selector
Constructor Details
#initialize(field) ⇒ GroupConcatFunctionSelector
Returns a new instance of GroupConcatFunctionSelector.
5 6 7 |
# File 'lib/rusql/group_concat_function_selector.rb', line 5 def initialize(field) @field = field end |
Instance Attribute Details
#field ⇒ Object (readonly)
Returns the value of attribute field.
3 4 5 |
# File 'lib/rusql/group_concat_function_selector.rb', line 3 def field @field end |
Instance Method Details
#to_s ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/rusql/group_concat_function_selector.rb', line 9 def to_s str = "GROUP_CONCAT(#{ self.field })" unless self.alias.nil? str += " AS #{self.alias}" end str end |