lib/rgviz_rails/adapters/mysql_adapter.rb in rgviz-rails-0.50 vs lib/rgviz_rails/adapters/mysql_adapter.rb in rgviz-rails-0.51
- old
+ new
@@ -63,7 +63,19 @@
arg.accept visitor
end
visitor << ")"
end
end
+
+ def visit_date_column(node, visitor)
+ visitor << "date #{visitor.escaped_string(node.value.strftime("%Y-%m-%d"))}"
+ end
+
+ def visit_date_time_column(node, visitor)
+ visitor << "timestamp #{visitor.escaped_string(node.value.strftime("%Y-%m-%d %H:%M:%S"))}"
+ end
+
+ def visit_time_of_day_column(node, visitor)
+ visitor << "time #{visitor.escaped_string(node.value.strftime("%H:%M:%S"))}"
+ end
end
end