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

Method Qualify

interpreter/interpretable.go:1142–1152  ·  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

1140
1141// Qualify observes the qualification of a object via a constant boolean, int, string, or uint.
1142func (e *evalWatchConstQual) Qualify(vars Activation, obj any) (any, error) {
1143 out, err := e.ConstantQualifier.Qualify(vars, obj)
1144 var val ref.Val
1145 if err != nil {
1146 val = types.LabelErrNode(e.ID(), types.WrapErr(err))
1147 } else {
1148 val = e.adapter.NativeToValue(out)
1149 }
1150 e.observer(vars, e.ID(), e.ConstantQualifier, val)
1151 return out, err
1152}
1153
1154// QualifyIfPresent conditionally qualifies the variable and only records a value if one is present.
1155func (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