[Chicago] auto incrementing - what options do we have?

Lukasz Szybalski szybalski at gmail.com
Fri Oct 10 22:17:34 CEST 2008


On Fri, Oct 10, 2008 at 12:31 PM, David Durham, Jr.
<david.durham.jr at gmail.com> wrote:
>>  > So what would be the transaction isolation in this case? Is that
>>  >  session option or do I change it only on first insert?
>>
>> I think you want repeatable read or read serializable.  Here's a
>>  Google feeling lucky for read serializable:
>>
>>  http://www.devx.com/getHelpOn/10MinuteSolution/16488/1954
>
> ..
>
> Forgot to say that this can look like this:
>
>   set transaction isolation level read serializable
>
> and yes, this applies to an SQL Session.
>

Thanks for the info. It seems as postgresql has the isolation
implemented which means I will be going with postgre then.
http://groups.google.com/group/sqlalchemy-devel/browse_thread/thread/653b6b2f49a940b8


FYI. This is some cool stuff. You can convert your existing database
to sqlalchemy source file and then manage the db structure from
there...


To convert your existing database to sqlalchemy source definitions use:

easy_install sqlalchemy-migrate
migrate create some "some repository" #Not sure if this is needed
migrate create_model --url="mysql://user:pass@localhost/production"
--repository=some >model.py

You could later use the model.py to generate same database in a
different db (mysql -> postgre, or mssql to postgre, etc)

Thanks guys,
Lucas


More information about the Chicago mailing list