Class RelationDefinitionSchema<E, R, RDef>

Wrapper around raw relation definition schemas from the Schema. You should never have to create this object yourself. Instead, retrieve these objects from the methods in the Schema class.

Type Parameters

Hierarchy

  • RelationDefinitionSchema

Constructors

Accessors

  • get constraints(): RDef["constraints"]
  • The list of constraints set for this relation definition schema. The returned type will change if this relationd definition schema describes an attribute or a relation.

    Returns RDef["constraints"]

  • get default(): RDef extends {
            default: V;
        }
        ? V
        : undefined
  • The default value for this relation. It can be used when creating new relations if the user did not enter a value (even if required).

    Returns RDef extends {
            default: V;
        }
        ? V
        : undefined

  • get description(): RDef["description"]
  • A short description which can be used as documentation for the relation definition schema.

    Returns RDef["description"]

  • get final(): RDef["final"]
  • True if the object of the relation definition schema is a primitive type. In this case the relation is called an "attribute".

    Returns RDef["final"]

  • get options(): RDef["options"]
  • The list of options set for this relation definition schema. The returned type will change if this relationd definition schema describes an attribute or a relation.

    Returns RDef["options"]

  • get type(): RDef["type"]
  • The type of the relation definition. This can also be referred to as the relation definition's name.

    Returns RDef["type"]

Methods

  • Checks if the relation is required when using the subject or object point of view.

    Parameters

    Returns boolean

Generated using TypeDoc