From b1e7bd7d026c888d4c406adc595577b7ebc84ed5 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 13 Aug 2010 15:30:22 -0700 Subject: insert manager is starting to take shape --- lib/arel/visitors/to_sql.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/arel/visitors') diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb index 2b3216abd3..7a97b0d445 100644 --- a/lib/arel/visitors/to_sql.rb +++ b/lib/arel/visitors/to_sql.rb @@ -12,6 +12,10 @@ module Arel end private + def visit_Arel_Nodes_InsertStatement o + "INSERT INTO #{visit o.relation}" + end + def visit_Arel_Nodes_SelectStatement o [ o.cores.map { |x| visit x }.join, -- cgit v1.2.3