A custom filter function is a narrowly scoped callable added to filter expressions when native syntax cannot safely express a required operation. It provides controlled flexibility without permitting arbitrary code, external data access, or unrestricted computation. section 22.3.2
Prefer a custom function when:
- A resource needs matching by a string prefix or suffix rather than exact equality. section 22.3.2
- A wildcard extension would introduce escaping and syntax-complexity problems. section 22.3.2
- One exceptional operation needs more computation, but arbitrary expressions would be unsafe or too expensive. section 22.3.2
String matching without wildcard syntax
Instead of extending equality with patterns such as title = "*(new)", expose a predefined helper for prefix or suffix matching. Keep the operation explicit and constrained rather than accepting amended syntax or arbitrary code. section 22.3.2
