Skip to content

Preview 6 Release Notes

Filtrera Preview 6 introduces more advanced type constraints, such as regular expressions patterns for text
1 min read

Primitive Literal Type Constraints

All primitive types now fully support literal constraints. This means that just as you could define a union of specific text or number before, this now extends to also include uuid, instant and all duration types.

Regular Expression Patterns

text has been expanded with a new constraint type, namely Regular Expressions. This means that a text type can be defined as a Regular Expression, and can hold any matching text. This is especially using when doing text matching:

from input match
/hot dog/ |> 'It''s probably a hot dog'
/hot/ |> 'It''s something hot'
/dog/ |> 'It''s dog-ish'
|> 'Not Hot Dog'

Parser Improvement of Arithmetic Operators

In preview 5, the right hand side of a logical operation was not eagerly evaluated. This meant that you needed to resort to parameters in order to compare the result of an arithmetic operation. In preview 6, the right-hand arithmetic operation is eagerly evaluated:

// In preview 5:
from 1 < (1 + 1)
// In preview 6:
from 1 < 1 + 1