function
Compare
func Compare(
path Path,
operator Operator,
value Value,
) (Expression, error)Construct a comparison while returning validation errors.
Prefer this form when the operator is dynamic. Convenience comparison functions panic only if called with an incompatible Value kind; with their documented inputs they are safe.
Related types
PathAn immutable, validated document field path.
OperatorThe finite comparison vocabulary.
ValueAn immutable scalar or list comparison operand.
ExpressionA sealed immutable predicate consumed atomically by stores.