Qualifier marker interface for designating different qualifier values and where they appear within field selections and index call expressions (`_[_]`).
| 65 | // Qualifier marker interface for designating different qualifier values and where they appear |
| 66 | // within field selections and index call expressions (`_[_]`). |
| 67 | type Qualifier interface { |
| 68 | // ID where the qualifier appears within an expression. |
| 69 | ID() int64 |
| 70 | |
| 71 | // IsOptional specifies whether the qualifier is optional. |
| 72 | // Instead of a direct qualification, an optional qualifier will be resolved via QualifyIfPresent |
| 73 | // rather than Qualify. A non-optional qualifier may also be resolved through QualifyIfPresent if |
| 74 | // the object to qualify is itself optional. |
| 75 | IsOptional() bool |
| 76 | |
| 77 | // Qualify performs a qualification, e.g. field selection, on the input object and returns |
| 78 | // the value of the access and whether the value was set. A non-nil value with a false presence |
| 79 | // test result indicates that the value being returned is the default value. |
| 80 | Qualify(vars Activation, obj any) (any, error) |
| 81 | |
| 82 | // QualifyIfPresent qualifies the object if the qualifier is declared or defined on the object. |
| 83 | // The 'presenceOnly' flag indicates that the value is not necessary, just a boolean status as |
| 84 | // to whether the qualifier is present. |
| 85 | QualifyIfPresent(vars Activation, obj any, presenceOnly bool) (any, bool, error) |
| 86 | } |
| 87 | |
| 88 | // ConstantQualifier interface embeds the Qualifier interface and provides an option to inspect the |
| 89 | // qualifier's constant value. |
no outgoing calls
no test coverage detected