util.encodings: Spell out all IDNA 2008 options ICU has
[prosody.git] / plugins / mod_debug_sql.lua
blob74cc2f68ac8d26758bb9d2714a9d9862a5e7d951
1 -- Enables SQL query logging
2 --
3 -- luacheck: ignore 213/uri
5 module:set_global();
7 local engines = module:shared("/*/sql/connections");
9 for uri, engine in pairs(engines) do
10 engine:debug(true);
11 end
13 setmetatable(engines, {
14 __newindex = function (t, uri, engine)
15 engine:debug(true);
16 rawset(t, uri, engine);
17 end
18 });
20 function module.unload()
21 setmetatable(engines, nil);
22 for uri, engine in pairs(engines) do
23 engine:debug(false);
24 end
25 end