Introducing Dragonfly Database Interface

A web framework in newLISP
Locked
itistoday
Posts: 429
Joined: Sun Dec 02, 2007 5:10 pm
Contact:

Introducing Dragonfly Database Interface

Post by itistoday »

Objective newLISP was, in fact, originally created for this purpose:

DF.DB - A Generic Database Interface for Dragonfly and newLISP

The first subclass has already been created for Sqlite3.

These will be in the next release of Dragonfly, but if anyone is interested I'm looking for people who help implement this interface for all the other major databases, starting with MySQL and PostgreSQL!
Get your Objective newLISP groove on.

itistoday
Posts: 429
Joined: Sun Dec 02, 2007 5:10 pm
Contact:

Re: Introducing Dragonfly Database Interface

Post by itistoday »

I've updated the interface and Sqlite3 to 1.1 with one more class: DF.BLOB.

DF.BLOB allows for efficient and intuitive storage and retrieval of BLOB datatypes (binary data). See the docs for more info.
Get your Objective newLISP groove on.

m35
Posts: 171
Joined: Wed Feb 14, 2007 12:54 pm
Location: Carifornia

Re: Introducing Dragonfly Database Interface

Post by m35 »

Have you considered using an existing library that takes care of abstracting databases? I haven't looked very thoroughly, but it seems OpenDBX might do the job.

itistoday
Posts: 429
Joined: Sun Dec 02, 2007 5:10 pm
Contact:

Re: Introducing Dragonfly Database Interface

Post by itistoday »

m35 wrote:Have you considered using an existing library that takes care of abstracting databases? I haven't looked very thoroughly, but it seems OpenDBX might do the job.
No, I did not, so thanks for pointing that out to me!

OpenDBX looks very nice indeed, thanks very much for pointing it out! If it's as good as it looks I will make a DF.DB subclass for it, in which case there won't be a need for any other subclasses it seems! :-)

Thankfully even in light of this news the Sqlite3 subclass still wasn't a waste of time for these reasons:

1) It's probably a little faster because it's not a wrapper to a wrapper.
2) It was necessary to implement to get a good idea of how the DF.DB interface should look like anyway.
3) It lets people use Sqlite3 with newLISP in a powerful way without having to install OpenDBX.
4) I wanted to learn the sqlite3 API. :-)

So that makes me feel a bit better, but very lucky that you pointed this out to me before I started implementing OpenDBX itself in newLISP. :-p

BTW, if anyone can recommend any similar libraries to OpenDBX please let me know!
Get your Objective newLISP groove on.

itistoday
Posts: 429
Joined: Sun Dec 02, 2007 5:10 pm
Contact:

Re: Introducing Dragonfly Database Interface

Post by itistoday »

I updated the Sqlite3 subclass to 1.1.1 to fix a bug related to binding integers with a 32-bit newlisp (on certain machines), also improved readability of logged errors.
Get your Objective newLISP groove on.

Locked