Class: ArelExtensions::Nodes::GroupConcat
- Inherits:
-
AggregateFunction
- Object
- Arel::Nodes::Function
- Function
- AggregateFunction
- ArelExtensions::Nodes::GroupConcat
- Defined in:
- lib/arel_extensions/nodes/concat.rb
Constant Summary collapse
- RETURN_TYPE =
:string
Instance Attribute Summary collapse
-
#separator ⇒ Object
Returns the value of attribute separator.
Attributes inherited from AggregateFunction
Instance Method Summary collapse
-
#initialize(node, separator = ', ', **opts) ⇒ GroupConcat
constructor
A new instance of GroupConcat.
Methods inherited from Function
#!=, #==, #as, #convert_to_date_node, #convert_to_datetime_node, #convert_to_node, #convert_to_number, #convert_to_string_node, #expr, #left, #return_type, #right, #type_of_attribute
Methods included from Predications
#cast, #convert_to_node, #imatches, #in, #matches, #not_in, #when
Constructor Details
#initialize(node, separator = ', ', **opts) ⇒ GroupConcat
Returns a new instance of GroupConcat.
48 49 50 51 |
# File 'lib/arel_extensions/nodes/concat.rb', line 48 def initialize node, separator = ', ', **opts @separator = convert_to_node(separator) super node, opts end |
Instance Attribute Details
#separator ⇒ Object
Returns the value of attribute separator.
46 47 48 |
# File 'lib/arel_extensions/nodes/concat.rb', line 46 def separator @separator end |