DELETE support
Matt S Trout [Sun, 31 Jul 2011 10:01:32 +0000 (10:01 +0000)]
lib/Data/Query/Constants.pm
lib/Data/Query/Renderer/SQL/Naive.pm

index 2b8a7fc..0850fbb 100644 (file)
@@ -14,6 +14,7 @@ use constant +{
     DQ_JOIN => 'Join',
     DQ_ORDER => 'Order',
     DQ_WHERE => 'Where',
+    DQ_DELETE => 'Delete',
   ))
 };
 
index 1049b46..6c2375a 100644 (file)
@@ -356,4 +356,9 @@ sub _render_order {
   \@ret;
 }
 
+sub _render_delete {
+  my ($self, $dq) = @_;
+  [ $self->_format_keyword('DELETE FROM'), @{$self->_render($dq->{from})} ];
+}
+
 1;