more questions from the reasonably na ïve regarding cursors, record locking, and committin g
"Eric S. Johansson" <[email protected]>
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <[email protected]> |
I originally posted this questions on the SQL light mailing list but in second thought, some of them may be more appropriate to pysqlite. I think some of these questions fall in the category of "running in the dark with scissors". If it's a simple matter of I need to read something, just point me at the appropriate documentation that I've obviously messed. I'm trying to get a handle on this cursor thing. it looks like it preserves state of some sort but I'm missing what state it is preserving. For example, do I need a different cursor for each table in the database? the reason I ask is that in my application, multiple tables will be in play at the same time in different threads and processes. Record locking. I did read http://www.sqlite.org/lockingv3.html I do a fair number of read/modify/write cycles on individual rows in all of the tables from multiple processes. if I interpret the documentation correctly, I need to create a transaction and when I am done changing things, "commit" which is really just turning on auto commit? Committing. how often should one commit? Is it even necessary if you close? What happens in case of a crash? Does journaling save one's bacon? If the change has not been "committed" will be visible to other processes using the same table? Many thanks for your answers and patience. -- Speech-recognition in use. It makes mistakes, I correct some.