Module: Arel::Expressions
- Defined in:
- 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 'lib/arel/expressions.rb', line 21 def average Nodes::Avg.new [self] end |
#count(distinct = false) ⇒ Object
5 6 7 |
# File 'lib/arel/expressions.rb', line 5 def count(distinct = false) Nodes::Count.new [self], distinct end |
#extract(field) ⇒ Object
25 26 27 |
# File 'lib/arel/expressions.rb', line 25 def extract(field) Nodes::Extract.new [self], field end |
#maximum ⇒ Object
13 14 15 |
# File 'lib/arel/expressions.rb', line 13 def maximum Nodes::Max.new [self] end |
#minimum ⇒ Object
17 18 19 |
# File 'lib/arel/expressions.rb', line 17 def minimum Nodes::Min.new [self] end |
#sum ⇒ Object
9 10 11 |
# File 'lib/arel/expressions.rb', line 9 def sum Nodes::Sum.new [self] end |