Sha256: 6929b9bbf3110f3eb1b80b56d94d53c67c1716b3bd77da10b41fb9a60d1888cd

Contents?: true

Size: 431 Bytes

Versions: 5

Compression:

Stored size: 431 Bytes

Contents

# frozen_string_literal: true
module Arel
  module Expressions
    def count distinct = false
      Nodes::Count.new [self], distinct
    end

    def sum
      Nodes::Sum.new [self]
    end

    def maximum
      Nodes::Max.new [self]
    end

    def minimum
      Nodes::Min.new [self]
    end

    def average
      Nodes::Avg.new [self]
    end

    def extract field
      Nodes::Extract.new [self], field
    end

  end
end

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
spiral_form-0.1.1 vendor/bundle/gems/arel-9.0.0/lib/arel/expressions.rb
spiral_form-0.1.0 vendor/bundle/gems/arel-9.0.0/lib/arel/expressions.rb
nullifyable-0.1.0 vendor/bundle/gems/arel-9.0.0/lib/arel/expressions.rb
arel-9.0.0 lib/arel/expressions.rb
arel-8.0.0 lib/arel/expressions.rb