initial basic collection test
[dbsrgits/DBIx-Data-Store-old.git] / lib / DBIx / Data / Store / Command.pm
1 package DBIx::Data::Store::Command;
2
3 use Moose::Role;
4 use Method::Signatures::Simple;
5
6 has [ 'run', 'with', 'against' ] => (is => 'ro', required => 1);
7
8 requires 'execute';
9
10 method _new_sth {
11   $self->against->run(sub {
12     $_->prepare_cached($self->run, {}, 3);
13   });
14 }
15
16 method _execute_sth ($sth) {
17   $sth->execute(@{$self->with});
18   $sth;
19 }
20
21 method _new_active_sth {
22   $self->_execute_sth($self->_new_sth);
23 }
24
25 1;