[Dbix-class] How to

Hardik Joshi hardik at mavenvista.com
Tue Jun 19 04:31:41 GMT 2012


Hello,

I have am working on one real time auction application where user used to
enter new bid based on previous minimum bid value. There is possibility
that two user will get same minimum value for their next bid. So I would
like to restrict second user on select statement if already first user has
fired select statement and waiting for insert statement to complete.

So could any one can guide me how to deal with such condition in
DBIx::Class.  I have tried

eg.

$schema->storage->txn_begin();
my $res =3D $schema->resultset('Test')->search($filter,
{for=3D>'update'})->first();

$schema->resultset('Test')->create($params);
$schema->storage->txn_commit();


Thanks,

Hardik Joshi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20120619/016=
cd2f8/attachment.htm


More information about the DBIx-Class mailing list