initial basic collection test
[dbsrgits/DBIx-Data-Store-old.git] / lib / DBIx / Data / Store / Command / Row.pm
1 package DBIx::Data::Store::Command::Row;
2
3 use Moose;
4 use Carp qw(carp);
5 use Method::Signatures::Simple;
6
7 method execute {
8   my $sth = $self->_new_active_sth;
9   my @row = $sth->fetchrow_array;
10   my @nextrow = $sth->fetchrow_array if @row;
11   if(@row && @nextrow) {
12     carp "Query returned more than one row - did you want a stream command?";
13   }
14   # Need to call finish() to work round broken DBDs
15   $sth->finish();
16   return \@row;
17 }
18
19 with 'DBIx::Data::Store::Command';
20
21 __PACKAGE__->meta->make_immutable;
22
23 1;
24