Re: [sqlite] limiting table size?

2006-01-02 Thread Dennis Cote
Julien LEFORT wrote: This looks like a great solution. Just another point, what if I want to fill this "ring buffer" automatically by using triggers on other tables, and be able to reset the counter of the ring buffer when I arrive at the max integer value of the primary key. --Create

Re: [sqlite] limiting table size?

2005-12-30 Thread Julien LEFORT
This looks like a great solution. Just another point, what if I want to fill this "ring buffer" automatically by using triggers on other tables, and be able to reset the counter of the ring buffer when I arrive at the max integer value of the primary key. For example : -- the table to be used

Re: [sqlite] limiting table size?

2005-12-22 Thread Clark Christensen
Looks like the experts have given good advice. I'll try a different tack... Have a look at http://www.sqlite.org/cvstrac/tktview?tn=1476 The author pointed me to this patch in response to my question about keeping a foreign sequence. But, I think the patch could work equally well for you,

Re: [sqlite] limiting table size?

2005-12-22 Thread Dennis Cote
Adler, Eliedaat wrote: Sean Wrote === I'm considering using SQLLite for an embedded project. Some of the data I'd like to store is timestamped sensor readings. I'd like to know if there is a way to >configure a table so that it acts like a fixed length FIFO queue, e.g. stores 10,000

RE: [sqlite] limiting table size?

2005-12-22 Thread Adler, Eliedaat
>Sean Wrote === >I'm considering using SQLLite for an embedded project. Some of the data I'd like to store is timestamped sensor readings. I'd like to know if there is a way to >configure a table so that it acts like a fixed length FIFO queue, e.g. stores 10,000 records then once full drops off

Re: [sqlite] limiting table size?

2005-12-20 Thread John Stanton
Since you are using a time your could try using a trigger which deleted the row with the oldest (lowest) time. You would need to have an index on the timestamp. I guess something like timestamp > 0 LIMIT 1 might work. Sean Machin wrote: Hi All, I'm considering using SQLLite for an embedded