method

aggregate

Importance_0
v6.1.3.1 - Show latest stable - 0 notes - Class: ToSql
aggregate(name, o, collector) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/arel/visitors/to_sql.rb, line 850
        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
Register or log in to add new notes.