<div>Not sure about DBIx::Class, but according to SQL you not need transaction like "transaction begin/commit", but need something like "select for update".</div><div>Quote from Mysql manual:</div><div>š</div><div>------- </div><div><a title="13.2.9.šSELECT Syntax" href="http://dev.mysql.com/doc/refman/5.6/en/select.html"><code>SELECT ... FOR UPDATE</code></a> locks the rows and any associated index entries</div><div>&lt;...&gt;</div><div>Other transactions are blocked from updating those rows, from doing <a title="13.2.9.šSELECT Syntax" href="http://dev.mysql.com/doc/refman/5.6/en/select.html"><code>SELECT ... LOCK IN SHARE MODE</code></a>, or from reading the data in certain transaction isolation levels.</div><div>-------</div><div>š</div><div>š</div><div>19.06.2012, 08:31, "Hardik Joshi" &lt;hardik@mavenvista.com&gt;:</div><blockquote type="cite">Hello,<div>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.</div><div>So could any one can guide me how to deal with such condition in DBIx::Class. šI have triedš</div><div>eg.</div><div>$schema-&gt;storage-&gt;txn_begin();</div><div>my $res = $schema-&gt;resultset('Test')-&gt;search($filter, {for=&gt;'update'})-&gt;first();</div><div>$schema-&gt;resultset('Test')-&gt;create($params);</div><div>$schema-&gt;storage-&gt;txn_commit();š</div><div>Thanks,</div><div>Hardik Joshi</div><p>_______________________________________________<br />List: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class</a><br />IRC: irc.perl.org#dbix-class<br />SVN: <a href="http://dev.catalyst.perl.org/repos/bast/DBIx-Class/">http://dev.catalyst.perl.org/repos/bast/DBIx-Class/</a><br />Searchable Archive: <a href="http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk">http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk</a></p></blockquote><div>-- <br />eaa@</div>