2011/4/1 YC <[email protected]>: > [...] > 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. _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
