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
20 21 22 |
# File 'lib/arel/expressions.rb', line 20 def average Nodes::Avg.new [self] end |
#count(distinct = false) ⇒ Object
4 5 6 |
# File 'lib/arel/expressions.rb', line 4 def count distinct = false Nodes::Count.new [self], distinct end |
#extract(field) ⇒ Object
24 25 26 |
# File 'lib/arel/expressions.rb', line 24 def extract field Nodes::Extract.new [self], field end |
#maximum ⇒ Object
12 13 14 |
# File 'lib/arel/expressions.rb', line 12 def maximum Nodes::Max.new [self] end |
#minimum ⇒ Object
16 17 18 |
# File 'lib/arel/expressions.rb', line 16 def minimum Nodes::Min.new [self] end |
#sum ⇒ Object
8 9 10 |
# File 'lib/arel/expressions.rb', line 8 def sum Nodes::Sum.new [self] end |