No need to get snippy. Fred did explain why this will not be changed at this point. more work to implement/maintain sqlite for purebasic and worse performance for PureBasic SQLite.
Also "delete from mytable order by fieldA limit 10", is fieldA numbers that are increasing? Or timestamps?
If they are timestamps then you can just take current time - some time, and then do a WHERE to delete anything older than some time.
If they are increasing entry numbers with no gaps, then simply track the first and last numbers.
If lastnumber-firstnumber>somenumber then to a delete with a WHERE that is firstnumber+10, that will delete the 10 oldest.
For a programmer there are usually multiple solutions to most problems.
Also remember that you may periodically need to use the VACUUM command to actually reclaim space as sqlite may not always resize a table after something has been deleted. (performance design).
Alternatively you could simply replace/overwrite old entries.
Do some speed tests with the various methods I've described here and see which gives you the best performance.
Can you share how you did it or the library? We are having an issue with earlier versions (like 3.7.9) of SQLite (the current compile version for v5.0 of PB). We need 3.7.13 or better.
Any help is appreciated. This is a commercial project we are working on.
purebuilt wrote:Can you share how you did it or the library? We are having an issue with earlier versions (like 3.7.9) of SQLite (the current compile version for v5.0 of PB). We need 3.7.13 or better.
Any help is appreciated. This is a commercial project we are working on.
Thanks
Well; the current version (5.10, b6) has an updated library -- how I did it was grab the amalgamation and changed/added #define's to enable the features I wanted, and built a library using (I think) Pelle's C or Watcom C. However, when I tried (before Fred updated the library) I kept getting errors in PB at link time about missing functions, that were not missing...
So, I would grab the latest lib from the beta and copy that over to your v5 lib.