Filters

Filters are used to transform one list or definition into another according to specified rules. Every element is treated as a file name, so filters Where and Order By can access file attributes.

[list] [filter]
[list] [filter] [filter]
[list] [filter] [filter] ...

Any number of filters can be attached to a collection. They are performed sequentially in order of their appearance.


Every

every [number]
Take every n-th element from the collection. For example, if n = 3, then taken is first, fourth, seventh, tenth, ... element.

Final

final [number]
Take n last elements from the collection.

Limit

limit [number]
Impose a limit on the length of the collection. The last elements that do not fit are omitted.

Order By

order by [order by unit]
order by [order by unit] , [order by unit]

This filter changes order of elements in a collection by sorting it. It may consist of one or multiple order by units. Each of them can contain file attributes. Additional units are used for comparison in cases when the first one indicates equality.

structurereturns
[value non-collection]order by unit
[value non-collection] ascorder by unit
[value non-collection] descorder by unit
By default, elements are sorted in an ascending order.
order asc
order desc
We can also call a simplified form of this filter as shown above. In this case, values are just sorted alphabetically by themselves.

Skip

skip [number]
Starting values of the collection are omitted.

Where

where [bool]
Values are filtered by a conditional statement. Condition can contain file attributes.