lua-users home
lua-l archive

Re: [ANN] Dado 1.0

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


Tomas Guisasola Gorham wrote:
Dado is a package that offers some facilities implemented over LuaSQL connection objects. Its main goals are:
 * better error messages,
 * iterators to access the result set and
 * more homogeneity in some commonly used database operations.
Dado is free software and uses the same license as Lua 5.1.
It can be downloaded from its LuaForge page:
http://dado.luaforge.net/
Thanks,
Tomás Guisasola
A small addition for dado.sql if you are interested. Had to add
local pairs = _G.pairs
to get it to work
---------------------------------------------------------------------
-- Builds a string with a JOIN command to be inserted into a SELECT
-- @param tab String containing initial table name
-- @param joins Hash table as tablename = cond
-- @return String to place in select after from
function join(tab, joins)
 local t = tab
 for k, v in pairs(joins) do
 t = t .. " join " .. k .. " on " .. v
 end
 return t
end
Mike

AltStyle によって変換されたページ (->オリジナル) /