MCPcopy Create free account
hub / github.com/cel-expr/cel-go / Qualify

Method Qualify

interpreter/interpretable.go:1554–1564  ·  view source on GitHub ↗

Qualify observes the qualification of a object via a constant boolean, int, string, or uint.

(vars Activation, obj any)

Source from the content-addressed store, hash-verified

1552
1553// Qualify observes the qualification of a object via a constant boolean, int, string, or uint.
1554func (e *evalWatchConstQual) Qualify(vars Activation, obj any) (any, error) {
1555 out, err := e.ConstantQualifier.Qualify(vars, obj)
1556 var val ref.Val
1557 if err != nil {
1558 val = types.LabelErrNode(e.ID(), types.WrapErr(err))
1559 } else {
1560 val = e.adapter.NativeToValue(out)
1561 }
1562 e.observer(vars, e.ID(), e.ConstantQualifier, val)
1563 return out, err
1564}
1565
1566// QualifyIfPresent conditionally qualifies the variable and only records a value if one is present.
1567func (e *evalWatchConstQual) QualifyIfPresent(vars Activation, obj any, presenceOnly bool) (any, bool, error) {

Callers

nothing calls this directly

Calls 5

LabelErrNodeFunction · 0.92
WrapErrFunction · 0.92
QualifyMethod · 0.65
IDMethod · 0.65
NativeToValueMethod · 0.65

Tested by

no test coverage detected