Module:CargoQuery/doc

From Caves of Qud Wiki
< Module:CargoQuery
Revision as of 19:44, 9 August 2019 by Teamtoto (talk | contribs) (Created page with "This module is taken from [https://help.gamepedia.com/Module:CargoQuery Gamepedia's CargoQuery module]. This module lets you get around the <code>|no html</code> bug that Car...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This is the documentation page for Module:CargoQuery

This module is taken from Gamepedia's CargoQuery module.

This module lets you get around the |no html bug that Cargo has by avoiding |format=template.

To use, preface query arguments with q?. Even if you are only using one table, use |q?tables=. You must specify the template that will handle each row of the query result using |template=. You may additionally specify |intro=, |outro=, |delimiter=, and |default=.

Use Lua names of all query parameters, so |q?join=, |q?groupBy, etc.

For simplicity of code, the named args parameter is required to be Yes, and you do not need to specify it.

Unlike |format=template, this wrapper will NOT rename parameters with underscores in them to use spaces instead.

Parameters & Invocation

{{#invoke:CargoQuery|main
|q?tables= 	<!-- corresponds to table / tables -->
|q?join= 	<!-- corresponds to join on -->
|q?fields= 	<!-- corresponds to fields -->
|q?where= 	<!-- corresponds to where -->
|q?groupBy= 	<!-- corresponds to group by -->
|q?having= 	<!-- corresponds to having -->
|q?orderBy= 	<!-- corresponds to order by -->
|q?limit= 	<!-- corresponds to limit -->
|template=      <!-- pagename of template (required) -->
|intro=
|outro=
|delimiter=
|default=
}}