From: Matt S Trout Date: Sun, 31 Jul 2011 10:01:32 +0000 (+0000) Subject: DELETE support X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dc657ce1c330949f697e55ca708f0da7c924ff69;p=dbsrgits%2FData-Query.git DELETE support --- diff --git a/lib/Data/Query/Constants.pm b/lib/Data/Query/Constants.pm index 2b8a7fc..0850fbb 100644 --- a/lib/Data/Query/Constants.pm +++ b/lib/Data/Query/Constants.pm @@ -14,6 +14,7 @@ use constant +{ DQ_JOIN => 'Join', DQ_ORDER => 'Order', DQ_WHERE => 'Where', + DQ_DELETE => 'Delete', )) }; diff --git a/lib/Data/Query/Renderer/SQL/Naive.pm b/lib/Data/Query/Renderer/SQL/Naive.pm index 1049b46..6c2375a 100644 --- a/lib/Data/Query/Renderer/SQL/Naive.pm +++ b/lib/Data/Query/Renderer/SQL/Naive.pm @@ -356,4 +356,9 @@ sub _render_order { \@ret; } +sub _render_delete { + my ($self, $dq) = @_; + [ $self->_format_keyword('DELETE FROM'), @{$self->_render($dq->{from})} ]; +} + 1;