Re: [SQLObject] Table locking with MySQL
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Jason H. <jas...@gm...> - 2010-11-30 10:26:54
|
On 30 November 2010 17:47, Oleg Broytman <ph...@ph...> wrote: > You can use low-level API like connection.query('LOCK...'). But I think > a better way would be to insert an AssemblyResult row in advance, use its > generated id (databases guarantee uniqueness and monotony of generated > id's) to create a document and then update the row with the name of the > document: This is (sort of) the approach I have now, but it won't work for indexing results for individual assemblies (which is what I want to move to), eg: > row = AssemblyResult(doc, ...) > number = row.id Even if this result is the first for a particular assembly, "number" will be something in the tens-of-thousands, instead of just 1. So maybe the low level API is the way to go. Cheers, Jason |