diff options
Diffstat (limited to 'lib/arel/update_manager.rb')
-rw-r--r-- | lib/arel/update_manager.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/arel/update_manager.rb b/lib/arel/update_manager.rb new file mode 100644 index 0000000000..3af73d2962 --- /dev/null +++ b/lib/arel/update_manager.rb @@ -0,0 +1,20 @@ +module Arel + class UpdateManager < Arel::TreeManager + def initialize engine + super + @head = Nodes::UpdateStatement.new + end + + ### + # UPDATE +table+ + def table table + @head.relation = table + self + end + + def where expr + @head.wheres << expr + self + end + end +end |