Predefinição:VarQuery
This template performs a Cargo query and stores its results into variables that can be used later on. The query must not yield more than one result.
Usage
The argument names are identical to the #cargo_query
arguments. The following are available:
{{VarQuery | tables = | fields = | where = | join on = | group by = | having = | order by = }}
- Note:
|table=
and|field=
may be used instead of|tables=
and|fields=
.|fields=
defaults to_pageName
The values get stored into variables. The variable names are the field names prefixed with cargo_
.
Example
{{VarQuery | tables = heroes | fields = image, primary_attribute | where = _pageName="Axe" }} * {{#var:cargo_image}} * {{#var:cargo_primary_attribute}}
Erro Lua em Módulo:VarQuery na linha 46: Mais de um resultado..
TemplateData
Sem descrição.
Parâmetro | Descrição | Tipo | Estado | |
---|---|---|---|---|
Tables | tables table | sem descrição
| String | obrigatório |
Fields | fields field | sem descrição
| String | recomendado |
Where | where | sem descrição
| String | recomendado |
Join on | join on | sem descrição | String | opcional |
Group by | group by | sem descrição | String | opcional |
Having | having | sem descrição | String | opcional |
Order by | order by | sem descrição | String | opcional |
Limit | limit | A limit of 1 may be set. This will supress the error multiple results usually produce. | Número | opcional |
Variable prefix | prefix | sem descrição
| String | opcional |