rewrite deparse system
[scpubgit/DX.git] / lib / DX / Action / BindValue.pm
index a355935..c8f43d1 100644 (file)
@@ -8,6 +8,18 @@ with 'DX::Role::SimpleAction';
 
 has new_value => (is => 'ro', required => 1);
 
+sub for_deparse {
+  my ($self) = @_;
+  [ statement => [
+    [ symbol => 'BindValue' ],
+    [ value_path => $self->target_path ],
+    [ value_path => $self->new_value
+                         ->action_builder
+                         ->inner_action_builder
+                         ->target_path ],
+  ] ];
+}
+
 sub _build__updates {
   my ($self) = @_;
   DX::Update::SetValue->new(