A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Jump to

Quick reference

Showing posts with label select. Show all posts
Showing posts with label select. Show all posts

Lock rows with DBIx::Class

$schema->txn_do(sub{

    $foos_rs->search({}, {for => 'update'})->all; # Lock rows

    # Check status of something

    # Update it
});

Perl DBI

This is the one you want:

$ary_ref = $dbh->selectcol_arrayref($statement);