Module:Learning

local p = {} --first function p.helloWorld = function return 'Hello, world!' end

--next function local cargo = mw.ext.cargo p.ShowAuthors = function tables = 'Authors' fields = 'Country' -- optional parameters are grouped in one table -- you can omit any or all of them, except join On if you use more than one table local args = { where = 'Country= "United States"' }   local result = cargo.query( tables, fields, args ) --return cargo.query( tables, fields, args ) return result end

p.MapByBiome = function(f) -- Expects one variable mapbiome (should be a map biome) tables = "Maps" fields = "Previews" local args = f.args local biome = { where = 'biome = "' .. args.biome .. '"', format = "list" }	local result = cargo.query(tables, fields, biome, format) return result[2] end return p