This module is a wrapper over mw.ext.cargo
. It also provides utilities for constructing queries.
Using this module instead of using mw.ext.cargo directly allows us to see via Special:WhatLinksHere what pages are running Cargo queries.
Lua error in Module:UtilsPage at line 14: attempt to call field 'allOf' (a nil value).
local p = {}
local cargo = mw.ext.cargo
local frame = mw.getCurrentFrame()
function p.declare(cargoTable, fields)
frame:callParserFunction{
name = '#cargo_declare:_table=' .. cargoTable,
args = fields
}
end
function p.store(cargoTable, fields)
frame:callParserFunction{
name = '#cargo_store:_table=' .. cargoTable,
args = fields
}
end
return setmetatable(p, {__index=cargo})