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.
Take every n-th element from the collection. For example, if n = 3, then taken is first, fourth, seventh, tenth, ... element.
Take n last elements from the collection.
Impose a limit on the length of the collection. The last elements that do not fit are omitted.
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.
structure | returns |
---|
[value non-collection] | order by unit |
[value non-collection] asc | order by unit |
[value non-collection] desc | order by unit |
By default, elements are sorted in an ascending order.
We can also call a simplified form of this filter as shown above.
In this case, values are just sorted alphabetically by themselves.
Starting values of the collection are omitted.
Values are filtered by a conditional statement.
Condition can contain file attributes.