<i><span class="Apple-style-span" style="font-style: normal;">I&#39;m not sure about how to lock the table, but you should be able to accomplish the rest of the transaction using the txn_do method:</span></i><div><i><span class="Apple-style-span" style="font-style: normal;"><br>
</span></i></div><div><i><span class="Apple-style-span" style="font-style: normal;"><a href="http://search.cpan.org/~frew/DBIx-Class-0.08115/lib/DBIx/Class/Storage.pm#txn_do">http://search.cpan.org/~frew/DBIx-Class-0.08115/lib/DBIx/Class/Storage.pm#txn_do</a></span></i></div>
<div><i><span class="Apple-style-span" style="font-style: normal;"><br></span></i></div><div><i><span class="Apple-style-span" style="font-style: normal;">-Bob<br></span></i><br><div class="gmail_quote">On Wed, Jan 20, 2010 at 4:59 PM, Wes Cravens <span dir="ltr">&lt;<a href="mailto:wcravens@cortex-it.com">wcravens@cortex-it.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">In an effort to create strictly sequential (Incrementing Integer no gaps) primary keys my method has traditionally been:<br>

<br>
BEGIN;<br>
LOCK table;<br>
SELECT MAX(id) FROM table;<br>
INSERT INTO table...;<br>
COMMIT;<br>
<br>
I&#39;m relatively new to DBIC and have not really seen a way to do this unless I create a wrapper to handle it.<br>
<br>
Is there something I am missing?<br>
<br>
Thanks,<br>
<br>
Wes<br>
<br>
_______________________________________________<br>
List: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class</a><br>
IRC: <a href="http://irc.perl.org#dbix-class" target="_blank">irc.perl.org#dbix-class</a><br>
SVN: <a href="http://dev.catalyst.perl.org/repos/bast/DBIx-Class/" target="_blank">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" target="_blank">http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Bob Stockdale<br><a href="mailto:robert.stockdale@gmail.com">robert.stockdale@gmail.com</a><br>
</div>