diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-17 17:44:07 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-17 17:44:07 -0700 |
commit | b69d3bfed823c6846a94d945a91d5a2551d47837 (patch) | |
tree | 1abda06772334672e0d08aa701124247bac630ca /lib/arel/visitors | |
parent | 466e3925b51aaf42c5bd02fbd566d371349a10b2 (diff) | |
parent | f8376607cd438a48f5838204d2ec9d0747769369 (diff) | |
download | rails-b69d3bfed823c6846a94d945a91d5a2551d47837.tar.gz rails-b69d3bfed823c6846a94d945a91d5a2551d47837.tar.bz2 rails-b69d3bfed823c6846a94d945a91d5a2551d47837.zip |
Merge branch 'v1' of github.com:flavorjones/arel into v1
* 'v1' of github.com:flavorjones/arel:
dot visitor supports Arel::Nodes::UpdateStatement
dot visitor supports Arel::Nodes::Equality
dot visitor supports symbols
Diffstat (limited to 'lib/arel/visitors')
-rw-r--r-- | lib/arel/visitors/dot.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/arel/visitors/dot.rb b/lib/arel/visitors/dot.rb index 8a03819768..ec2db0814f 100644 --- a/lib/arel/visitors/dot.rb +++ b/lib/arel/visitors/dot.rb @@ -45,6 +45,12 @@ module Arel visit_edge o, "limit" end + def visit_Arel_Nodes_UpdateStatement o + visit_edge o, "relation" + visit_edge o, "wheres" + visit_edge o, "values" + end + def visit_Arel_Table o visit_edge o, "name" end @@ -58,6 +64,11 @@ module Arel alias :visit_Arel_Attributes_Time :visit_Arel_Attribute alias :visit_Arel_Attributes_Boolean :visit_Arel_Attribute + def visit_Arel_Nodes_Equality o + visit_edge o, "left" + visit_edge o, "right" + end + def visit_String o @node_stack.last.fields << o end @@ -66,6 +77,7 @@ module Arel alias :visit_TrueClass :visit_String alias :visit_Arel_SqlLiteral :visit_String alias :visit_Fixnum :visit_String + alias :visit_Symbol :visit_String def visit_Hash o o.each_with_index do |pair, i| |