aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/arel/nodes/count.rb
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2018-04-25 08:18:02 +0930
committerGitHub <noreply@github.com>2018-04-25 08:18:02 +0930
commit989b1cb4a326632a686d61df42695b27e4ef6b2e (patch)
tree026a41714b44dba185f084f8f21bb81eb01db681 /activerecord/lib/arel/nodes/count.rb
parent7e815415edbe42f1df64d786a8f923a171778d64 (diff)
parent354f1c28e81d9846fb9e5346fcca50cf303c12c1 (diff)
downloadrails-989b1cb4a326632a686d61df42695b27e4ef6b2e.tar.gz
rails-989b1cb4a326632a686d61df42695b27e4ef6b2e.tar.bz2
rails-989b1cb4a326632a686d61df42695b27e4ef6b2e.zip
Merge pull request #32097 from matthewd/arel
Merge Arel
Diffstat (limited to 'activerecord/lib/arel/nodes/count.rb')
-rw-r--r--activerecord/lib/arel/nodes/count.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/activerecord/lib/arel/nodes/count.rb b/activerecord/lib/arel/nodes/count.rb
new file mode 100644
index 0000000000..c8e409ea8b
--- /dev/null
+++ b/activerecord/lib/arel/nodes/count.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+module Arel # :nodoc: all
+ module Nodes
+ class Count < Arel::Nodes::Function
+ include Math
+
+ def initialize(expr, distinct = false, aliaz = nil)
+ super(expr, aliaz)
+ @distinct = distinct
+ end
+ end
+ end
+end