Module: Arel::Expressions
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/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/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/expressions.rb', line 21 def average Nodes::Avg.new [self] end |
#count(distinct = false) ⇒ Object
5 6 7 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/expressions.rb', line 5 def count(distinct = false) Nodes::Count.new [self], distinct end |
#extract(field) ⇒ Object
25 26 27 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/expressions.rb', line 25 def extract(field) Nodes::Extract.new [self], field end |
#maximum ⇒ Object
13 14 15 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/expressions.rb', line 13 def maximum Nodes::Max.new [self] end |