Module: Arel::Expressions
- Defined in:
- activerecord/lib/arel/expressions.rb
Instance Method Summary collapse
- #average ⇒ Object
- #count(distinct = false) ⇒ Object
- #extract(field) ⇒ Object
- #maximum ⇒ Object
- #minimum ⇒ Object
- #sum ⇒ Object
Instance Method Details
#average ⇒ Object
21 22 23 |
# File 'activerecord/lib/arel/expressions.rb', line 21 def average Nodes::Avg.new [self] end |
#count(distinct = false) ⇒ Object
5 6 7 |
# File 'activerecord/lib/arel/expressions.rb', line 5 def count(distinct = false) Nodes::Count.new [self], distinct end |
#extract(field) ⇒ Object
25 26 27 |
# File 'activerecord/lib/arel/expressions.rb', line 25 def extract(field) Nodes::Extract.new [self], field end |
#maximum ⇒ Object
13 14 15 |
# File 'activerecord/lib/arel/expressions.rb', line 13 def maximum Nodes::Max.new [self] end |