diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-09-11 11:28:00 +0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-11 13:18:20 +0800 |
commit | b9402889ff4cc6fc18ad0d035fecc8e36f320f90 (patch) | |
tree | 09c83a1fc95896b293d04cdab2052ec1b792fa2a /lib/arel/nodes/sql_literal.rb | |
parent | 84e8875c559dd63f69bad536a660dfe2666cf289 (diff) | |
download | rails-b9402889ff4cc6fc18ad0d035fecc8e36f320f90.tar.gz rails-b9402889ff4cc6fc18ad0d035fecc8e36f320f90.tar.bz2 rails-b9402889ff4cc6fc18ad0d035fecc8e36f320f90.zip |
Add maximum to SqlLiteral.
Diffstat (limited to 'lib/arel/nodes/sql_literal.rb')
-rw-r--r-- | lib/arel/nodes/sql_literal.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/arel/nodes/sql_literal.rb b/lib/arel/nodes/sql_literal.rb index 526d088449..6471469d9f 100644 --- a/lib/arel/nodes/sql_literal.rb +++ b/lib/arel/nodes/sql_literal.rb @@ -4,6 +4,10 @@ module Arel def count distinct = false Count.new [self], distinct end + + def maximum + Nodes::Max.new [self], Nodes::SqlLiteral.new('max_id') + end end end end |