Updated SQLite Library?

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: Updated SQLite Library?

Post by jassing »

USCode wrote:
jassing wrote:I was just asking if that could be part of the sqlite library in PB... sorry if my request was improper.
No need to say sorry. It doesn't hurt to ask, all Fred can do is say "No". :wink:
Oh, I didn't realize that it was an automatic no... pisser - I'll convert to compiling & using a dll then.

thanks.
User avatar
Rescator
Addict
Addict
Posts: 1769
Joined: Sat Feb 19, 2005 5:05 pm
Location: Norway

Re: Updated SQLite Library?

Post by Rescator »

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.
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: Updated SQLite Library?

Post by jassing »

I went ahead and compiled my own sqlite3.lib -- works fine, no performance hit.
thanks.
User avatar
purebuilt
User
User
Posts: 46
Joined: Sun Dec 17, 2006 5:30 pm
Location: Milwaukee, WI, USA

Re: Updated SQLite Library?

Post by purebuilt »

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
- DB
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: Updated SQLite Library?

Post by jassing »

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.
Post Reply