Paul Bohme escreveu:

This at least makes LuaSQL useful in environments (like the one I find myself in) where code that uses string concatenation for queries is strictly forbidden as a matter of policy.
Hi, Paul

There is currently a discussion among the developers about implementing more SQL features in LuaSQL. I believe its time to bring this discussion to the list. :-)

It is my opinion that parametrized queries can only be achieved when one has access to the database schema -- a thing that is currently outside LuaSQL scope.

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?

The solution we have been discussing involves strengthening the SQL part of LuaSQL 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?
--
Luís Eduardo Jason Santos

_______________________________________________
Kepler-Project mailing list
[email protected]
http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project
http://www.keplerproject.org/

Reply via email to