diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-13 13:23:52 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-13 13:23:52 -0700 |
commit | d3625bbf8f22e9225f6568cd91caaea5cde903bd (patch) | |
tree | 9bfe96280c6c0b3293af5a1905f91978e8770681 /lib/arel/visitors | |
parent | d28290386b148d7b1e4ed70e5bb8da7e6819d187 (diff) | |
download | rails-d3625bbf8f22e9225f6568cd91caaea5cde903bd.tar.gz rails-d3625bbf8f22e9225f6568cd91caaea5cde903bd.tar.bz2 rails-d3625bbf8f22e9225f6568cd91caaea5cde903bd.zip |
add locking support for postgres
Diffstat (limited to 'lib/arel/visitors')
-rw-r--r-- | lib/arel/visitors/postgresql.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/arel/visitors/postgresql.rb b/lib/arel/visitors/postgresql.rb index 5e03f40984..553ee91bf9 100644 --- a/lib/arel/visitors/postgresql.rb +++ b/lib/arel/visitors/postgresql.rb @@ -2,6 +2,10 @@ module Arel module Visitors class PostgreSQL < Arel::Visitors::ToSql private + def visit_Arel_Nodes_Lock o + "FOR UPDATE" + end + def visit_Arel_Nodes_SelectStatement o if !o.orders.empty? && using_distinct_on?(o) subquery = o.dup |