sub next {
my $self = shift;
+
+ # using cursor so we don't inflate anything
my ($row) = $self->_resultset->cursor->next;
+
return $row;
}
sub all {
my $self = shift;
+
+ # using cursor so we don't inflate anything
return map { $_->[0] } $self->_resultset->cursor->all;
}
sub reset {
my $self = shift;
$self->_resultset->cursor->reset;
- return undef;
+ return $self;
}
=head2 first
sub first {
my $self = shift;
- $self->_resultset->reset();
+
+ # using cursor so we don't inflate anything
+ $self->_resultset->cursor->reset;
my ($row) = $self->_resultset->cursor->next;
+
return $row;
}
#
# Returns the underlying resultset. Creates it from the parent resultset if
# necessary.
-#
+#
sub _resultset {
my $self = shift;