[Dbix-class] Constraints within cursor

Peter Edwards peter at dragonstaff.com
Tue Oct 3 20:05:35 CEST 2006


I hit a problem recently using DBIx::Class against SQLite.

I was traversing a set of records using a cursor (or rather ->search then
->next which I guess is the same thing) and then doing some updates on
related records in another table.

Now I know of old from Oracle that a delete within cursor is the sort of
thing to cause problems, and in this case I was getting an error saying the
SQLite db was locked. The workaround I used was to select the outer records
into a perl array then do the updates, which didn't matter in this case as
the db is only accessed by a single process, but with multiple processes I'd
run the risk of inconsistent data.

Is this something I should be solving with locking statements or some other
means?

 

Thanks, Peter

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/dbix-class/attachments/20061003/dba9d153/attachment.htm 


More information about the Dbix-class mailing list