[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: [ANN] SqlTable
- From: "Aaron B." <aaron@...>
- Date: Sat, 8 Feb 2014 17:17:50 -0500
As prompted by a previous thread, I have finally gotten around to
officially releasing my SQL interface library, SqlTable.
https://zadzmo.org/code/sqltable
It uses metaprogramming to make relational database tables appear to be
tables-of-tables in Lua. In code, this means:
-- insert
t[ sql.next ] = { data = "data", flag = true }
-- select
row = t[ 32 ]
-- update
t[ 32 ] = { flag = false }
-- delete
t[ 32 ] = nil
The feature set is more extensive but that's the basic idea. A
tutorial, download links, and documentation is available on the site as
linked above. It should be available via Luarocks as well pending
upload.
SqlTable is built on LuaDBI and fully supports PostgreSQL. It has
partial support for SQLite. MySQL is implemented but unfortunately
causes segmentation faults. If you are the current maintainer of
LuaDBI, I would love to talk to you! I've got a lot of patches for it ;)
--
Aaron B. <aaron@zadzmo.org>