Re: [sqlite] SELECT and UPDATE in single query

2013-01-24 Thread Sven Bloesl
Richard Baron Penman wrote: >And then I process it like this, N keys at a time: > >SELECT key FROM queue WHERE status=0 LIMIT N; >BEGIN TRANSACTION; >for key in keys: >UPDATE queue SET status=1 WHERE key=key; >END TRANSACTION; > > >How can this SELECT and UPDATE be combined more efficiently?

Re: [sqlite] Rollback of nested savepoints with System.Data.SQLite

2012-09-17 Thread Sven Bloesl
Joe Mistachkin wrote: > Sven Bloesl wrote: > > > BEGIN IMMEDIATE > > > > SAVEPOINT SP1 > > CREATE TABLE a(key number primary key); > > > > SAVEPOINT SP2 > > INSERT INTO a VALUES(666); > > SELECT count(1) FROM a Expected: 1, Got

[sqlite] Rollback of nested savepoints with System.Data.SQLite

2012-09-16 Thread Sven Bloesl
Hello, I'm using System.Data.SQLite 1.0.82.0 and can't get nested savepoint work in my application. Rollbacks to the nested savepoint do not have any effects, only rollbacks to the outermost savepoint undo my changes. According to the SQLite documentation this should work and I verified that wit