On Dec 11, 2009, at 7:57 PM, Luís Santos wrote: > It is my opinion that parametrized queries can only be achieved when one has > access to the database schema
Hmmm... non sequitur? > -- a thing that is currently outside LuaSQL scope. Good. Lets not go down that rabbit hole. Not with LuaSQL in any case. > > i.e.: how can LuaSQL know that "123" should be treated as a number and not as > a string (or date, or blob) if it has been passed to the API as a string? Why would it need to know? Why the second guessing? LuaSQL is a "database connectivity" library. It doesn't need to know anything aside from how to pass random string to a rdbms and return the result, if any. Nothing more, nothing less. > The solution we have been discussing involves strengthening the SQL part of > LuaSQL Hmmm... sounds like a dead end. There is no such a thing as 'SQL'. Instead, there are as many SQL dialects as there are RDBMS implementations. This is not the place for LuaSQL to go. Database connectivity is complex enough as it is. > and delegating the 'database driver' problem to another more specific > project, with an 'uglier' (but more complete) API. > This way we could make LuaSQL an SQL generator (more name-appropriate) and > keep its simple API (adding schema declaration and introspection > capabilities) and the module itself will use the underlying 'driver' module > to achieve its goals. > > Thoughts? To quote the memorable Javier Guerra: "Hell No!" :)) Some reading for those long winter nights: http://blogs.tedneward.com/2006/06/26/The+Vietnam+Of+Computer+Science.aspx Cheers, PA. _______________________________________________ Kepler-Project mailing list [email protected] http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project http://www.keplerproject.org/
