Module:User:Kai/sandbox: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
Test bucket method calling convention (via update-page on MediaWiki MCP Server)
Inspect bucket instance fields in detail (via update-page on MediaWiki MCP Server)
Line 3: Line 3:
function p.view(frame)
function p.view(frame)
     local b = mw.ext.bucket('feedback')
     local b = mw.ext.bucket('feedback')
     b:select('page', 'user', 'status', 'feedback')
     local debug_info = {}
    local res = b:run()
    for k, v in pairs(b) do
     return mw.dumpObject(res)
        table.insert(debug_info, tostring(k) .. " = " .. mw.dumpObject(v))
    end
     return "<pre>" .. table.concat(debug_info, "\n") .. "</pre>"
end
end


return p
return p

Revision as of 21:21, 27 August 2026

Documentation for this module may be created at Module:User:Kai/sandbox/doc

local p = {}

function p.view(frame)
    local b = mw.ext.bucket('feedback')
    local debug_info = {}
    for k, v in pairs(b) do
        table.insert(debug_info, tostring(k) .. " = " .. mw.dumpObject(v))
    end
    return "<pre>" .. table.concat(debug_info, "\n") .. "</pre>"
end

return p