[sqlite] Table creation with open cursors

2005-12-24 Thread Blake Ross
Hi all, I understand that with 3.1 it's no longer possible to create tables while cursors are open on any table in the database. The source suggests that this is due entirely to the mechanics of auto-vacuum mode: http://www.srcdoc.com/sqlite_3.2.2/btree_8c-source.html#l04716. So I'm curious

RE: [sqlite] Locking

2005-12-24 Thread Dan Petitt
> Isolation in SQLite is SERIALIZABLE. Note that SERIALIZABLE > implies that locking can be no more fine-grained than table-level. > You can obtain table-level locking in SQLite now. Just put each > table in a separate database file and ATTACH as many tables to > your connection as you require.

RE: [sqlite] Locking

2005-12-24 Thread Dan Petitt
> Does your flat file support ACID transactions? That´s the killer feature fo > my app. I want to store financial transactions and I don´t trust normal flat > files. No it isnt acid, its not got critical information in it but it does need very fast read access and write access that doesn’t block

RE: [sqlite] ring buffer table

2005-12-24 Thread Richard B. Boulton
But I think this would: CREATE TABLE ring_buffer (key INTEGER PRIMARY KEY AUTOINCREMENT, stuff TEXT); CREATE TRIGGER delete_tail AFTER INSERT ON ring_buffer BEGIN DELETE FROM ring_buffer WHERE key%10=NEW.key%10 AND key!=NEW.key; END; INSERT INTO ring_buffer (stuff) VALUES('Stuff 1'); INSERT

RE: [sqlite] ring buffer table

2005-12-24 Thread Richard B. Boulton
oops, just realised that doesn't work when you get further than 10. > -Original Message- > From: Richard B. Boulton [mailto:[EMAIL PROTECTED] > Sent: 24 December 2005 10:37 > To: sqlite-users@sqlite.org > Subject: RE: [sqlite] ring buffer table > > > If you used an INTEGER PRIMARY KEY

RE: [sqlite] ring buffer table

2005-12-24 Thread Richard B. Boulton
If you used an INTEGER PRIMARY KEY AUTOINCREMENT could you use a simple trigger and a modulus of the newly inserted rowid? e.g. for a dimension of 10: CREATE TABLE ring_buffer (key INTEGER PRIMARY KEY AUTOINCREMENT, stuff TEXT); CREATE TRIGGER delete_tail AFTER INSERT ON ring_buffer BEGIN