Sha256: f9028a0e4da7e86edfc5b2ede29115a846dd04c7b3eb7a0e9a28b297c8745ec3

Contents?: true

Size: 532 Bytes

Versions: 21

Compression:

Stored size: 532 Bytes

Contents

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

    def sum
      Nodes::Sum.new [self], Nodes::SqlLiteral.new('sum_id')
    end

    def maximum
      Nodes::Max.new [self], Nodes::SqlLiteral.new('max_id')
    end

    def minimum
      Nodes::Min.new [self], Nodes::SqlLiteral.new('min_id')
    end

    def average
      Nodes::Avg.new [self], Nodes::SqlLiteral.new('avg_id')
    end

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

Version data entries

21 entries across 16 versions & 5 rubygems

Version Path
mdg-1.0.1 vendor/bundle/ruby/2.3.0/gems/arel-3.0.3/lib/arel/expressions.rb
angular-rails4-templates-0.4.1 vendor/ruby/2.1.0/gems/arel-5.0.1.20140414130214/lib/arel/expressions.rb
angular-rails4-templates-0.4.0 vendor/ruby/2.1.0/gems/arel-5.0.1.20140414130214/lib/arel/expressions.rb
angular-rails4-templates-0.3.0 vendor/ruby/2.1.0/gems/arel-5.0.1.20140414130214/lib/arel/expressions.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/2.1.0/gems/arel-3.0.3/lib/arel/expressions.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/arel-3.0.3/lib/arel/expressions.rb
apl-library-0.0.90 vendor/bundle/ruby/1.8/gems/arel-3.0.3/lib/arel/expressions.rb
apl-library-0.0.90 vendor/bundle/ruby/1.9.1/gems/arel-3.0.3/lib/arel/expressions.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.8/gems/arel-3.0.3/lib/arel/expressions.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.9.1/gems/arel-3.0.3/lib/arel/expressions.rb
arel-6.0.0.beta2 lib/arel/expressions.rb
arel-6.0.0.beta1 lib/arel/expressions.rb
arel-5.0.1.20140414130214 lib/arel/expressions.rb
arel-4.0.2 lib/arel/expressions.rb
arel-5.0.0 lib/arel/expressions.rb
arel-3.0.3 lib/arel/expressions.rb
arel-4.0.1 lib/arel/expressions.rb
challah-1.0.0 vendor/bundle/gems/arel-4.0.0/lib/arel/expressions.rb
arel-4.0.0 lib/arel/expressions.rb
arel-4.0.0.beta2 lib/arel/expressions.rb