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: Peter Bex
Subject: Re: [Chicken-users] Generic RDBMS Interface [Was: Re: Creating Windows GUI App]
Date: Fri, 1 Apr 2011 21:40:37 +0200
User-agent: Mutt/1.4.2.3i

On Fri, Apr 01, 2011 at 12:29:40PM -0700, YC wrote:
> URI is definitely an interesting approach.  I originally wanted to use a
> connection string like ODBC, but realized that since I am using DBI to be
> more than just for RDBMS (I have a memcached driver and a filepath driver)
> and the key/value pairs is not fixed, so it becomes a situation where the
> underlying driver will dictate the key/value pairs, so I just bypass the
> need to parse the connection string (and user's need to format such string)
> and let the underlying driver call the shot.

I don't understand; doesn't an URI have the same problem as a connection
string?  You still need to parse the individual components from it and
pass them to the driver (possibly constructing another db-specific
connection string)

The Postgres API for example provides a way to pass slots in a null-delimited
array of pointers, which relieves the user from having to encode special
characters like quotes, spaces or colons specially.  This is also slightly
more efficient since you don't need to parse anything.

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



reply via email to

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