Class: Arel::Nodes::Count

Inherits:
Function show all
Defined in:
lib/arel/nodes/count.rb

Instance Attribute Summary collapse

Attributes inherited from Function

#alias, #expressions

Instance Method Summary collapse

Methods inherited from Function

#as

Methods inherited from Node

#and, #each, #not, #or, #to_sql

Constructor Details

#initialize(expr, distinct = false, aliaz = nil) ⇒ Count

Returns a new instance of Count.



7
8
9
10
# File 'lib/arel/nodes/count.rb', line 7

def initialize expr, distinct = false, aliaz = nil
  super(expr, aliaz)
  @distinct = distinct
end

Instance Attribute Details

#distinctObject

Returns the value of attribute distinct.



5
6
7
# File 'lib/arel/nodes/count.rb', line 5

def distinct
  @distinct
end