chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] SQLite3 bindings for CHICKEN 4


From: Peter Bex
Subject: Re: [Chicken-users] SQLite3 bindings for CHICKEN 4
Date: Wed, 5 Aug 2009 14:30:07 +0200
User-agent: Mutt/1.4.2.3i

On Wed, Aug 05, 2009 at 01:36:55PM +0200, Thomas Chust wrote:
> of course I have seen it, but several people requested my SQLite3
> binding to be ported to CHICKEN 4 anyway.

Fair enough, I just wanted to point it out :)

> The APIs of the two bindings don't differ too much in my opinion, but
> it can't hurt to have a choice.

It's good to have choice, but it can also be confusing.

> Could you elaborate which parts of the
> sql-de-lite API seem more schemely to you?

sqlite3 is more OO-like and has many operations which are purely invoked
for their side-effects (returning #<void>), whereas sql-de-lite seems
more FP-like and minimal.

> Personally I dislike several design choices in sql-de-lite: A client
> side statement cache may be convenient in some situations but it
> always adds a little overhead and doesn't really belong into a direct
> database API binding, but rather into an ORM or other higher level
> layer that hides the database details.

I agree here, this is something that wouldn't need to be in the egg and
complicates its code considerably.  I'm sure Jim had his reasons to
include it, though.

> Allowing the database to be
> closed if statements are still active is necessary when a statement
> cache is used, but I think it opens a source of hard to find bugs if
> included in a low level database access layer like sql-de-lite -- the
> application programmer is still responsible that every statement has
> finished executing before the database is closed, but will no longer
> be notified when she fails to do so.

I'm not sure about this.  Could you give an example?

> And last but not least I like to
> use user defined SQL functions from time to time, which is not
> possible with sql-de-lite.

I think this is just not implemented yet rather than a design decision
not to support it at all.

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                        -- Donald Knuth

Attachment: pgpOe0SYiLecK.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]