chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Generic RDBMS Interface [Was: Re: Creating Windows G


From: Thomas Chust
Subject: Re: [Chicken-users] Generic RDBMS Interface [Was: Re: Creating Windows GUI App]
Date: Fri, 1 Apr 2011 14:47:47 +0200

2011/4/1 YC <address@hidden>:
> [...]
> would you be interested in considering to look at my racket bzlib/dbi
> package on racket planet as a potential idea for interface?  I was looking
> to port it over to chicken but never got around to it due to other things.
>  it would be good to have schemers interested in databases to collaborate.
> [...]

Hello YC,

the bzlib/dbi PLaneT package is indeed a good source of inspiration
for coding another DBI system.

There is at least one small point that I would want to do differently,
though: In my opinion it has some value if the procedure establishing
the database connection has a fixed signature and driver specific
information is encoded in a single argument. I'm pondering about using
an URI for that purpose. This has the advantage that it's very easy
then to read this single parameter from a configuration file and keep
the code one writes entirely agnostic of any driver specifics.

What I like about the bzlib/dbi interface is that SQL syntax is
somewhat normalized with respect to query parameter placeholders and
reformatted by the specific driver. To make the interface more natural
I wonder whether it wouldn't be nice to pass the query parameters as
keyword arguments to the procedure executing the query, though. In
particular, this style of argument passing would be compatible with
optionally allowing positional arguments, too.

Ciao,
Thomas


-- 
When C++ is your hammer, every problem looks like your thumb.



reply via email to

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