The part I would like to express directly in Lua is the SQL statement itself. The statement could then be applied to a variety of 'sources' (
e.g. in memory tables, objects, traditional relational databases, file systems, what not).
Something along the lines of JoSQL (SQL for Java Objects), but without the need for a full blown SQL parser:
http://josql.sourceforge.net/Thoughts?