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

Method Qualify

interpreter/interpretable.go:1222–1232  ·  view source on GitHub ↗

Qualify observes the qualification of a object via a value computed at runtime.

(vars Activation, obj any)

Source from the content-addressed store, hash-verified

1220
1221// Qualify observes the qualification of a object via a value computed at runtime.
1222func (e *evalWatchQual) Qualify(vars Activation, obj any) (any, error) {
1223 out, err := e.Qualifier.Qualify(vars, obj)
1224 var val ref.Val
1225 if err != nil {
1226 val = types.LabelErrNode(e.ID(), types.WrapErr(err))
1227 } else {
1228 val = e.adapter.NativeToValue(out)
1229 }
1230 e.observer(vars, e.ID(), e.Qualifier, val)
1231 return out, err
1232}
1233
1234// QualifyIfPresent conditionally qualifies the variable and only records a value if one is present.
1235func (e *evalWatchQual) 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