lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 18/02/2015, at 1:17 pm, Geoff Leyland <geoff_leyland@fastmail.fm> wrote:
> 
> Hi,
> 
> Does anyone have experience with, for example, LuaDBI and LuaSQL?  It looks like LuaDBI (on googlecode at least) hasn’t been updated since 2010, while LuaSQL dates to 2012.  Any alternatives?  I’ve tended to use one of the SQLite-only drivers in the past, but now I need to connect to Postgres, so it’s probably time I educated myself a bit.

Sorry to reply to my own post, but thanks to Daurnimator and Marc (and thanks to everyone else who replied!), I tried luapgsql.  It works well.

However, since it didn’t operate quite like the sqlite3 binding I’d been using (lsqlite3), I wrote a wrapper to make the two look more similar.  Since postgres doesn’t seem to support named query parameters, I faked those.  Since some of the pgsql stuff was nicer than the lsqlite3 stuff, I wrapped lsqlite3 too.

So now I have a half-assed, yet-another, database connectivity tool.  It doesn’t actually do the connectivity bit, it just makes the calls to other dbcs look the same (of course doesn’t fix the different dialects of SQL, except for parameter syntax).  It offers prepared queries and query parameters, which, as far as I can tell, LuaDBI and LuaSQL don’t.  On the other hand, it’s so not finished that it’s barely started.

Any interest from anyone that such a thing should be let out into the light of day?