CelqlTranslator
Translates checked CEL expressions through one profile major version.
A translator resolves selected libraries at construction time. It is safe to reuse for independent operations because each profile call receives a complete per-call context.
Type Parameters
Section titled “Type Parameters”Desc extends DescMessage = DescMessage
Translation
Section titled “Translation”Translation = unknown
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CelqlTranslator<
Desc,Translation>(profile,options?):CelqlTranslator<Desc,Translation>
Binds a profile and an optional, fixed set of translation libraries.
The constructor rejects invalid profile metadata, incompatible libraries, duplicate overload owners, and unsatisfied library dependencies.
Parameters
Section titled “Parameters”profile
Section titled “profile”Profile<Desc, Translation>
options?
Section titled “options?”CreateTranslatorOptions<Translation> = {}
Returns
Section titled “Returns”CelqlTranslator<Desc, Translation>
Methods
Section titled “Methods”capability()
Section titled “capability()”capability():
DialectCapabilityProfile
Returns a copy of the effective capability for the bound profile and libraries.
Changes to the returned message do not change this translator.
Returns
Section titled “Returns”DialectCapabilityProfile
translate()
Section titled “translate()”translate(
request):TranslationOutcome<MessageShape<Desc>>
Translates one checked CEL Boolean expression to the bound profile output.
Boolean literals return matchAll or matchNone; record-dependent input
returns one complete predicate. Throws CelqlError on specified rejection.
Parameters
Section titled “Parameters”request
Section titled “request”Returns
Section titled “Returns”TranslationOutcome<MessageShape<Desc>>
validate()
Section titled “validate()”validate(
request):void
Validates one checked expression without producing a predicate.
Throws CelqlError when the expression, limits, configuration, or selected
profile fragment is invalid.
Parameters
Section titled “Parameters”request
Section titled “request”Returns
Section titled “Returns”void