function
OptionFilterValueFor
OptionFilterValueFor limits a static option filter to one polymorphic target.
Arguments
| Argument | Type | Description |
|---|---|---|
collection | string | The collection value. |
targetPath | string | The targetPath value. |
operator | RelationshipFilterOperator | The operator value. |
value | Value | The value value. |
Returns
The declared result.
RelationshipFilterRuleFull signature
func OptionFilterValueFor[
Value ~string
| ~bool
| ~int
| ~int8
| ~int16
| ~int32
| ~int64
| ~uint
| ~uint8
| ~uint16
| ~uint32
| ~uint64
| ~float32
| ~float64,
](
collection,
targetPath string,
operator RelationshipFilterOperator,
value Value,
) RelationshipFilterRuleRelated types
RelationshipFilterOperatorRelationshipFilterOperator is the finite predicate vocabulary used to narrow admin options.
RelationshipFilterRuleRelationshipFilterRule derives one target predicate from current document data. Collection optionally limits the rule to one target of a polymorphic relationship.