method

aggregate

rails latest stable - Class: Arel::Visitors::ToSql
aggregate(name, o, collector)
private

No documentation available.

# File activerecord/lib/arel/visitors/to_sql.rb, line 982
        def aggregate(name, o, collector)
          collector << "#{name}("
          if o.distinct
            collector << "DISTINCT "
          end
          collector = inject_join(o.expressions, collector, ", ") << ")"
          if o.alias
            collector << " AS "
            visit o.alias, collector
          else
            collector
          end
        end