Simple start on UPDATE clause backcompat
[dbsrgits/SQL-Abstract-2.0-ish.git] / lib / SQL / Abstract / Compat.pm
index edde9e7..2ba75f8 100644 (file)
@@ -80,10 +80,23 @@ class SQL::Abstract::Compat {
   {
     my $ast = $self->select_ast($from,$fields,$where,$order);
 
-    $DB::single = 1;
     return ($self->visitor->dispatch($ast), @{$self->visitor->binds});
   }
 
+  method update(Str|ArrayRef|ScalarRef $from,   
+                HashRef $fields, WhereType $where? )
+  {
+    my $ast = $self->update_aste($from,$fields,$where);
+
+    return ($self->visitor->dispatch($ast), @{$self->visitor->binds});
+  }
+
+  method update_ast(Str|ArrayRef|ScalarRef $from,   
+                    HashRef $fields, WhereType $where? ) 
+  {
+    return { -type => 'update' };
+  }
+
   method select_ast(Str|ArrayRef|ScalarRef $from, ArrayRef|Str $fields,
                 WhereType $where?,
                 WhereType $order?)