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 _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users