diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-14 13:39:33 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-14 13:39:33 -0700 |
commit | b93a23827a2244ec730be1b46ec44fb368d00396 (patch) | |
tree | 6fe68c4c927512b5f3914c5c8e795ce998208491 /lib/arel/nodes | |
parent | de5f2916aa47fb1274d56a2c5c5ba636f5fe2cc4 (diff) | |
download | rails-b93a23827a2244ec730be1b46ec44fb368d00396.tar.gz rails-b93a23827a2244ec730be1b46ec44fb368d00396.tar.bz2 rails-b93a23827a2244ec730be1b46ec44fb368d00396.zip |
adding an EXISTS node, update method will generate an IN clause
Diffstat (limited to 'lib/arel/nodes')
-rw-r--r-- | lib/arel/nodes/exists.rb | 11 | ||||
-rw-r--r-- | lib/arel/nodes/select_statement.rb | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/lib/arel/nodes/exists.rb b/lib/arel/nodes/exists.rb new file mode 100644 index 0000000000..167a345006 --- /dev/null +++ b/lib/arel/nodes/exists.rb @@ -0,0 +1,11 @@ +module Arel + module Nodes + class Exists + attr_reader :select_stmt + + def initialize select_stmt + @select_stmt = select_stmt + end + end + end +end diff --git a/lib/arel/nodes/select_statement.rb b/lib/arel/nodes/select_statement.rb index 6272fd126d..637ba5d1d0 100644 --- a/lib/arel/nodes/select_statement.rb +++ b/lib/arel/nodes/select_statement.rb @@ -14,7 +14,7 @@ module Arel def initialize_copy other super - @cores = @cores.clone + @cores = @cores.map { |x| x.clone } end end end |