Module:User:Kai/sandboxGive feedback
Documentation for this module may be created at Module:User:Kai/sandbox/doc
local p = {}
function p.view(frame)
local results = {}
-- test _G.bucket vs mw.ext.bucket
local b1 = _G.bucket('feedback')
local s1, e1 = pcall(function() b1:select('page') end)
table.insert(results, "_G.bucket select: " .. tostring(s1) .. " err: " .. tostring(e1))
-- test where
local b2 = mw.ext.bucket('feedback')
local s2, e2 = pcall(function() b2:where('status', 'resolved') end)
table.insert(results, "mw.ext.bucket where: " .. tostring(s2) .. " err: " .. tostring(e2))
return "<pre>" .. table.concat(results, "\n") .. "</pre>"
end
return p