Skip to content

TypeQLiteValidationCode

const TypeQLiteValidationCode: object

Defined in: libs/language/src/typeqlite-validation-codes.ts:17

Diagnostic codes for the validation rules, defined once.

They live here, in the language package, because that is the layer the runtime depends on rather than the reverse. diagnostics.ts composes its DiagnosticCode from these for the rules both layers speak about.

readonly annotationArguments: "typedblite.annotation-arguments" = 'typedblite.annotation-arguments'

A repeated @values argument, or an argument that does not fit the value type.

readonly annotationNotAdmitted: "typedblite.annotation-not-admitted" = 'typedblite.annotation-not-admitted'

An annotation on a subject that does not admit it — ADMITTED in typeqlite-annotations.ts. It replaced key-on-role.

readonly annotationNotEnforced: "typedblite.annotation-not-enforced" = 'typedblite.annotation-not-enforced'

One code for every annotation the grammar parses and the runtime does not enforce — @card, @unique, @independent, … It replaced card-not-implemented and unique-not-implemented when the rule changed from refusing to reporting (see TypeQLiteValidator).

readonly annotationRepeated: "typedblite.annotation-repeated" = 'typedblite.annotation-repeated'

Two annotations of one category on one subject — “Try redefine instead”.

readonly anonymousVariable: "typedblite.anonymous-variable" = 'typedblite.anonymous-variable'

select $_, sort $_, reduce … groupby $_ — a stage that names a variable needs a named one.

readonly duplicateLabel: "typedblite.duplicate-label" = 'typedblite.duplicate-label'

readonly duplicateOwns: "typedblite.duplicate-owns" = 'typedblite.duplicate-owns'

readonly repeatedClause: "typedblite.repeated-clause" = 'typedblite.repeated-clause'

entity a sub b, sub c — a second sub or value clause on one type.

readonly reservedKeyword: "typedblite.reserved-keyword" = 'typedblite.reserved-keyword'

readonly unboundValue: "typedblite.unbound-value" = 'typedblite.unbound-value'

$v > $h with $v bound by nothing — a value read before anything assigns it.

readonly unknownLabel: "typedblite.unknown-label" = 'typedblite.unknown-label'

A label no file in the workspace defines (ADR-008 D6). Editor-only: reported by TypeQLiteDocumentValidator, never by a registered check, so the runtime never sees it (ADR-008 D2).

readonly unknownValueType: "typedblite.unknown-value-type" = 'typedblite.unknown-value-type'

value rgba — a name that is not a value type.

readonly unprojectableVariable: "typedblite.unprojectable-variable" = 'typedblite.unprojectable-variable'

readonly valueTypeOnThing: "typedblite.value-type-on-thing" = 'typedblite.value-type-on-thing'

entity cream value double — a thing type has no value.

TypeDBLite is an independent open-source project, built on TypeDB with thanks. It is not affiliated with, sponsored by, or endorsed by TypeDB Ltd. Released under the MPL-2.0 license.