[Dbix-class] Strict sequence primary key

Wes Cravens wcravens at cortex-it.com
Wed Jan 20 21:59:19 GMT 2010


In an effort to create strictly sequential (Incrementing Integer no 
gaps) primary keys my method has traditionally been:

BEGIN;
LOCK table;
SELECT MAX(id) FROM table;
INSERT INTO table...;
COMMIT;

I'm relatively new to DBIC and have not really seen a way to do this 
unless I create a wrapper to handle it.

Is there something I am missing?

Thanks,

Wes



More information about the DBIx-Class mailing list