aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/arel/expressions.rb22
1 files changed, 8 insertions, 14 deletions
diff --git a/lib/arel/expressions.rb b/lib/arel/expressions.rb
index 717cf412ee..d40268c292 100644
--- a/lib/arel/expressions.rb
+++ b/lib/arel/expressions.rb
@@ -4,31 +4,25 @@ module Arel
Nodes::Count.new [self], distinct
end
- def sum(alias_as = "sum_id")
- Nodes::Sum.new [self], node_alias(alias_as)
+ def sum
+ Nodes::Sum.new [self]
end
- def maximum(alias_as = "max_id")
- Nodes::Max.new [self], node_alias(alias_as)
+ def maximum
+ Nodes::Max.new [self]
end
- def minimum(alias_as = "min_id")
- Nodes::Min.new [self], node_alias(alias_as)
+ def minimum
+ Nodes::Min.new [self]
end
- def average(alias_as = "avg_id")
- Nodes::Avg.new [self], node_alias(alias_as)
+ def average
+ Nodes::Avg.new [self]
end
def extract field
Nodes::Extract.new [self], field
end
- private
-
- def node_alias(alias_as)
- alias_as.nil? ? nil : Nodes::SqlLiteral.new(alias_as)
- end
-
end
end