Sha256: 50efd5d3367031ba7bcbf382ebaabe91da41a6335ab3bf9d4eed2c420dcaad77

Contents?: true

Size: 462 Bytes

Versions: 125

Compression:

Stored size: 462 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
  end
end

Version data entries

125 entries across 112 versions & 13 rubygems

Version Path
challah-0.7.0.pre2 vendor/bundle/gems/arel-3.0.2/lib/arel/expressions.rb
dirty_history-0.6.3 dirty_history/ruby/1.9.1/gems/arel-2.2.1/lib/arel/expressions.rb
challah-0.7.0.pre vendor/bundle/gems/arel-3.0.2/lib/arel/expressions.rb
challah-0.6.2 vendor/bundle/gems/arel-3.0.2/lib/arel/expressions.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/arel-3.0.2/lib/arel/expressions.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/arel-3.0.2/lib/arel/expressions.rb
dirty_history-0.6.2 dirty_history/ruby/1.9.1/gems/arel-2.2.1/lib/arel/expressions.rb
dirty_history-0.6.1 dirty_history/ruby/1.9.1/gems/arel-2.2.1/lib/arel/expressions.rb
initforthe-cookies-0.0.1 vendor/bundle/gems/arel-3.0.2/lib/arel/expressions.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/arel-3.0.2/lib/arel/expressions.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/arel-3.0.2/lib/arel/expressions.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/arel-3.0.2/lib/arel/expressions.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/arel-3.0.2/lib/arel/expressions.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/arel-3.0.2/lib/arel/expressions.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/arel-3.0.2/lib/arel/expressions.rb
rails-uploader-0.0.4 vendor/bundle/ruby/1.9.1/gems/arel-3.0.2/lib/arel/expressions.rb
dirty_history-0.6.0 dirty_history/ruby/1.9.1/gems/arel-2.2.1/lib/arel/expressions.rb
challah-0.6.1 vendor/bundle/gems/arel-3.0.2/lib/arel/expressions.rb
challah-0.6.1 vendor/bundle/gems/arel-3.0.0/lib/arel/expressions.rb
dirty_history-0.5.4 dirty_history/ruby/1.9.1/gems/arel-2.2.1/lib/arel/expressions.rb