[sqlite] Best practice for connections and cursors

2013-07-31 Thread Joseph L. Casale
I have created a python module that I import within several files that simply opens a connection to an sqlite file and defines several methods which each open a cursor before they either select or insert data. As the module opens a connection, wherever I import it I can call a commit against the

[sqlite] Transaction Handling

2013-07-31 Thread techi eth
Is it possible to use Sqlite3 transaction capability based on actual return of individual transaction query execution? Example: BEGIN SELECT for reading the database (Here I will get data in my read call back function Based on data status I may initiate other transaction, like below Update)

Re: [sqlite] Query on database back-up:

2013-07-31 Thread Dan Kennedy
On 07/31/2013 07:33 PM, Simon Slavin wrote: On 31 Jul 2013, at 12:56pm, techi eth wrote: I have followed below link for details. It say “If another thread or process writes to the source database while this function is sleeping, then SQLite detects this and usually

Re: [sqlite] Query on database back-up:

2013-07-31 Thread techi eth
Thanks for answer. Let me put my query on point mentioned by comparing historic way of doing copy at the start of link. 1. "Any database clients wishing to write to the database file while a backup is being created must wait until the shared lock is relinquished." Example 1: Loading and Saving

Re: [sqlite] Comparing two tables column by column

2013-07-31 Thread ibrahim
On 30.07.2013 14:49, fnoyan...@yahoo.com wrote: Yes, it is slow actually. But I could not do it with SQL. I wish I could do more with SQL than code, which would give a good performance improvement. From overall application point of view, I may be considering using threads to read from

Re: [sqlite] Query on database back-up:

2013-07-31 Thread Simon Slavin
On 31 Jul 2013, at 12:56pm, techi eth wrote: > I have followed below link for details. It say “If another thread or > process writes to the source database while this function is sleeping, then > SQLite detects this and usually restarts the backup process when >

[sqlite] Query on database back-up:

2013-07-31 Thread techi eth
Hi, Case: “I copied first five pages from database using online backup api & during sleep time other process write to database which is actually part of first copied five pages, In that case at the end of backup can I assure I will have my database backed up with latest changes. (Changes done