initial basic collection test
[dbsrgits/DBIx-Data-Store-old.git] / lib / DBIx / Data / Store / Command / Row.pm
CommitLineData
65b76960 1package DBIx::Data::Store::Command::Row;
2
3use Moose;
4use Carp qw(carp);
5use Method::Signatures::Simple;
6
7method 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
19with 'DBIx::Data::Store::Command';
20
21__PACKAGE__->meta->make_immutable;
22
231;
24