Модуль:Статистика
Перейти к навигации
Перейти к поиску
Для документации этого модуля может быть создана страница Модуль:Статистика/doc
local p = {}
local tools = require( 'Module:Tools' )
local cq = mw.ext.cargo.query
function p.StatD( frame )
--[[
local docs = frame:callParserFunction{ name = '#cargo_query', args = { '',
tables = 'docs',
fields = 'COUNT(_pageID) = docs',
-- limit = 10000,
format = 'native',
default = '',
} }
return mw.ext.cargo.get()[1].docs
--]]
return cq( 'docs', 'COUNT(_pageID)', {} )[1]['COUNT(_pageID)']
end
function p.StatP( frame )
--[[
local persons = frame:callParserFunction{ name = '#cargo_query', args = { '',
tables = 'persons',
fields = 'COUNT(_pageID) = persons',
-- limit = 10000,
format = 'native',
default = '',
} }
return mw.ext.cargo.get()[1].persons
--]]
return cq( 'persons', 'COUNT(_pageID)', {} )[1]['COUNT(_pageID)']
end
return p