Class: Prosperity::Aggregate::Count

Inherits:
Base
  • Object
show all
Defined in:
lib/prosperity/aggregate/count.rb

Instance Method Summary collapse

Instance Method Details

#apply(scope, options = {}) ⇒ Object



7
8
9
# File 'lib/prosperity/aggregate/count.rb', line 7

def apply(scope, options = {})
  scope.count
end

#to_sqlObject



3
4
5
# File 'lib/prosperity/aggregate/count.rb', line 3

def to_sql
  "COUNT(1)"
end