NAME
SQLx::Core::Result - Class for SQLx::Core results
DESCRIPTION
A single row is known as a Result. This module handles methods for them.
result
Returns the result arrayref.
for my $row (@{$res->result}) {
print $row->{mykey} . "\n";
}
insert_id
Gets the primary key value of the last inserted row. It will require the primary key to be set, though
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!