NAME
SQLx::Lite::Result - Class for SQLx::Lite results
DESCRIPTION
When you perform a ResultSet search it will return and bless it as a SQLx::Lite::Result, allowing you to perform Result actions on that object.
next
A simple iterator to loop through a result
while(my $row = $result->next) {
print $row->{name};
}
result
Returns the result arrayref.
for my $row (@{$res->result}) {
print $row->{mykey} . "\n";
}
count
Returns the number of rows found
update
Updates the current result using the hash specified
my $res = $dbh->resultset('foo_table')->search([], { id => 5132 });
if ($res->update({name => 'New Name'})) {
print "Updated!\n";
}
delete
Drops the records in the current search result
my $res = $resultset->search([], { id => 2 });
$res->delete; # gone!