Editing Module:User:Kai/sandboxGive feedback
Jump to navigation
Jump to search
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 1: | Line 1: | ||
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 | |||