Re: [sqlite] how to do automatic rollback on any error?

2011-10-05 Thread Pero Mirko
OK, I think I got it. Thank you both Igor and Simon for your kind answers! ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] how to do automatic rollback on any error?

2011-10-05 Thread Pero Mirko
So in other words a pseudo function like this: BEGIN EXCLUSIVE if anyerror return INSERT INTO [table] if anyerror ROLLBACK INSERT INTO [table] if anyerror ROLLBACK UPDATE [table] if anyerror ROLLBACK UPDATE [table] if anyerror ROLLBACK COMMIT if anyerror ROLLBACK return Would that guarantee ROLLB

Re: [sqlite] how to do automatic rollback on any error?

2011-10-05 Thread Pero Mirko
> > >and then it fails - will the database insert / update / delete first 10 or > >will it return to initial state before any inserts? > >The default behavior is ABORT, which means the statement that caused the error is rolled back, but the transaction stays open with any prior changes still in pl

[sqlite] how to do automatic rollback on any error?

2011-10-03 Thread Pero Mirko
If I do BEGIN EXCLUSIVE insert / update / delete queries here COMMIT does it guarantee it will automatically rollback if the error occurs or do I have to specify it manually? What happens if I have 20 queries, 10 execute successfully (after COMMIT) and then it fails - will the database

[sqlite] Sharing some speed-test results BLOB vs flat-file... comments?

2011-09-05 Thread Pero Mirko
Here are some speed tests for those interested. My main concern was speed of reading rows from database. The comparison was measured by QueryPerformanceCounter which is most precise AFAIK on Windows. A couple of hundred runs for each test to eliminate statistical error. In tests there were 3 SQLi

[sqlite] Determining size of insert row/query before inserting

2011-08-25 Thread Pero Mirko
How would you recommend to approach this problem: I want to determine how much disk space a certain insert will take before actually executing it so I can fail insert before doing it rather than trying to insert, then receive SQLite Disk I/O error when the disk is filled. So I would determine fir