Semantic MediaWiki/markup/ask: Difference between revisions
from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
m Woozle moved page Semantic MediaWiki/ask to Semantic MediaWiki/markup/ask without leaving a redirect: reorganizing |
No edit summary |
||
| Line 1: | Line 1: | ||
== | {{fmt/title|Semantic MediaWiki "#ask" syntax}} | ||
==Syntax== | |||
===Operators=== | |||
* {{fmt/code|::}} : "equals" | |||
* {{fmt/code|::>}} : "greater than" | |||
===Dates=== | |||
By default, the filter condition {{fmt/code|{{fmt/arg|property_name}}::{{fmt/arg|property_value}}}} means {{fmt/code|WHERE {{fmt/arg|property_name}} ''equals'' {{fmt/arg|property/value}}}}. Note that {{fmt/arg|property_value}} that is filtering for a date with no time will ''not'' pull up pages where {{fmt/arg|property_value}} is set to a full timestamp in which the time is not 00:00. | |||
==Official Documentation== | |||
* [[smw:Help:Inline queries|Inline queries]]: mostly covers #ask but also #{{l/same|show}} briefly | * [[smw:Help:Inline queries|Inline queries]]: mostly covers #ask but also #{{l/same|show}} briefly | ||
* [[smw:Help:Result formats|Formats]]: | * [[smw:Help:Result formats|Formats]]: | ||
| Line 7: | Line 14: | ||
** [[smw:Help:Ol format|OL format]] | ** [[smw:Help:Ol format|OL format]] | ||
** [[smw:Help:Ul format|UL format]] | ** [[smw:Help:Ul format|UL format]] | ||
===Operators=== | |||
Note that there does not seem to be any documentation specifically about available comparison operators. The {{fmt/code|::>}} and {{fmt/code|::<}} operators are mentioned in passing in a couple of places: | |||
* [[smw:Help:Calendar format]] - {{fmt/quote|Don't worry that the comparison operators are {{fmt/code|<}} and {{fmt/code|>}} instead of {{fmt/code|<=}} and {{fmt/code|>=}}; the return values of the parser functions are set so that this will not be an issue.}} This doesn't clarify whether this is true in general or only within the Calendar context. | |||
* [[smw:Help:$smwgQStrictComparators]] - by default, {{fmt/code|::>}} and {{fmt/code|::<}} are treated as {{fmt/code|≥}} and {{fmt/code|≤}} | |||
Revision as of 15:27, 6 February 2025
Syntax
Operators
- Template:Fmt/code : "equals"
- Template:Fmt/code : "greater than"
Dates
By default, the filter condition Template:Fmt/code means Template:Fmt/code. Note that Template:Fmt/arg that is filtering for a date with no time will not pull up pages where Template:Fmt/arg is set to a full timestamp in which the time is not 00:00.
Official Documentation
- Inline queries: mostly covers #ask but also #Template:L/same briefly
- Formats:
Operators
Note that there does not seem to be any documentation specifically about available comparison operators. The Template:Fmt/code and Template:Fmt/code operators are mentioned in passing in a couple of places:
- smw:Help:Calendar format - Template:Fmt/quote This doesn't clarify whether this is true in general or only within the Calendar context.
- smw:Help:$smwgQStrictComparators - by default, Template:Fmt/code and Template:Fmt/code are treated as Template:Fmt/code and Template:Fmt/code
