53 lines
3.0 KiB
Plaintext
53 lines
3.0 KiB
Plaintext
Start query: ?
|
|
- by default, queries search the publication
|
|
Query current object: ^
|
|
- refers specifically to the object based off of this specific type
|
|
Query relative object: $
|
|
- refers to the last relative object in the heirarchy
|
|
Access child: .
|
|
- this also maps over all items in a list and returns a list of the relevant children
|
|
- if the parent is a list, it will return a list of just the specified child
|
|
Select: []
|
|
- Selects any of the items that matches the provided selector
|
|
- Providing a number selects the ordinal item in the list
|
|
- Providing a comparator selects items that match the comparator
|
|
- Selectors can be separated by either commas for "and" or slashes for "or", but not both
|
|
Comparators:
|
|
= is similar to
|
|
== is exactly the same
|
|
> greater than
|
|
< less than
|
|
>= greater than or equal to
|
|
<= less than or equal to
|
|
!! is true/exists
|
|
! is not
|
|
/ or, allows matching one or more comparators at the same time
|
|
Combiner: ()
|
|
- Will only select items that match all of the selectors
|
|
- Selectors can be separated by either commas for "and" or slashes for "or", but not both
|
|
|
|
--Templating--
|
|
insertion: {{}}
|
|
- Allows for queries to be wrapped in a templated string
|
|
- Can be either a direct query or used in combination with the "_" character to reference a single query
|
|
single query: <<?
|
|
- Used the same as start query, but appended to the end of a templated string
|
|
- Used in conjunction with "_" to reference the queried value
|
|
query reference: _
|
|
- used in conjunction with single query to reference the queried value
|
|
separator: ::;;
|
|
- used at the end of a template to indicate how to separate results when the results are more than one.
|
|
- Whatever text is placed between in the middle is treated as the full separator, or in other words, if the separator doesn't have any spaces, then there will be no spaces between items in the final text
|
|
- If no separator is provided, it will default to comma and space separation
|
|
- placed at the end of the template but before the single query
|
|
- should support any standard escaped characters such as newline
|
|
|
|
Examples:
|
|
?core.weapon_abilities[name=Rapid Fire].body
|
|
- this searches the publication 'core' object for weapon_abilities that have the name
|
|
Sustained Hits {{?^sustained_hits}}
|
|
- This formats the string with the queried values, which start the query within the same object that the field exists in. This would result in the string 'Sustained Hits 1'
|
|
Anti-{{_.keyword}} {{_.value}}<<?^anti_abilities
|
|
- This formats the string with the queried values, which start the query within the same object that the field exists in. This would result in the string 'Anti-Infantry 2+' or 'Anti-Infantry 2+, Anti-Monster 4+' if there are more than one matching values
|
|
Anti-{{_.keyword}} {{_.value}}:://;;<<?^anti_abilities
|
|
- This formats the string with the queried values, which start the query within the same object that the field exists in. This would result in the string 'Anti-Infantry 2+' or 'Anti-Infantry 2+//Anti-Monster 4+' if there are more than one matching values |