Class EntitySchema<E, R, ERawSchema>

Wrapper around raw entity 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

  • EntitySchema

Constructors

  • Wrapper around raw entity 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

    • E extends readonly EntityRawSchema[] = EntityRawSchemaArray

    • R extends readonly Readonly<{ cardinality: "**" | "*1" | "*?" | "*+" | "1*" | "11" | "1?" | "1+" | "?*" | "?1" | "??" | "?+" | "+*" | "+1" | "+?" | "++"; description: string; subject: E[number]["type"]; type: string } & { constraints: Readonly<RQLVocabularyConstraint>[]; final: false; object: string; options: RelationOptions } & { cardinality: "**" | "*1" | "*?" | "*+" | "1*" | "11" | "1?" | "1+" | "?*" | "?1" | "??" | "?+" | "+*" | "+1" | "+?" | "++"; description: string; subject: E[number]["type"]; type: string } & Readonly<StringBuildObj> & { constraints: AttributeConstraint[]; final: true; options: AttributeOptions } & { cardinality: "**" | "*1" | "*?" | "*+" | "1*" | "11" | "1?" | "1+" | "?*" | "?1" | "??" | "?+" | "+*" | "+1" | "+?" | "++"; description: string; subject: E[number]["type"]; type: string } & Readonly<PasswordBuildObj> & { constraints: AttributeConstraint[]; final: true; options: AttributeOptions } & { cardinality: "**" | "*1" | "*?" | "*+" | "1*" | "11" | "1?" | "1+" | "?*" | "?1" | "??" | "?+" | "+*" | "+1" | "+?" | "++"; description: string; subject: E[number]["type"]; type: string } & Readonly<BytesBuildObj> & { constraints: AttributeConstraint[]; final: true; options: AttributeOptions } & { cardinality: "**" | "*1" | "*?" | "*+" | "1*" | "11" | "1?" | "1+" | "?*" | "?1" | "??" | "?+" | "+*" | "+1" | "+?" | "++"; description: string; subject: E[number]["type"]; type: string } & Readonly<IntBuildObj> & { constraints: AttributeConstraint[]; final: true; options: AttributeOptions } & { cardinality: "**" | "*1" | "*?" | "*+" | "1*" | "11" | "1?" | "1+" | "?*" | "?1" | "??" | "?+" | "+*" | "+1" | "+?" | "++"; description: string; subject: E[number]["type"]; type: string } & Readonly<BigIntBuildObj> & { constraints: AttributeConstraint[]; final: true; options: AttributeOptions } & { cardinality: "**" | "*1" | "*?" | "*+" | "1*" | "11" | "1?" | "1+" | "?*" | "?1" | "??" | "?+" | "+*" | "+1" | "+?" | "++"; description: string; subject: E[number]["type"]; type: string } & Readonly<FloatBuildObj> & { constraints: AttributeConstraint[]; final: true; options: AttributeOptions } & { cardinality: "**" | "*1" | "*?" | "*+" | "1*" | "11" | "1?" | "1+" | "?*" | "?1" | "??" | "?+" | "+*" | "+1" | "+?" | "++"; description: string; subject: E[number]["type"]; type: string } & Readonly<BooleanBuildObj> & { constraints: AttributeConstraint[]; final: true; options: AttributeOptions } & { cardinality: "**" | "*1" | "*?" | "*+" | "1*" | "11" | "1?" | "1+" | "?*" | "?1" | "??" | "?+" | "+*" | "+1" | "+?" | "++"; description: string; subject: E[number]["type"]; type: string } & Readonly<DecimalBuildObj> & { constraints: AttributeConstraint[]; final: true; options: AttributeOptions } & { cardinality: "**" | "*1" | "*?" | "*+" | "1*" | "11" | "1?" | "1+" | "?*" | "?1" | "??" | "?+" | "+*" | "+1" | "+?" | "++"; description: string; subject: E[number]["type"]; type: string } & Readonly<DateBuildObj> & { constraints: AttributeConstraint[]; final: true; options: AttributeOptions } & { cardinality: "**" | "*1" | "*?" | "*+" | "1*" | "11" | "1?" | "1+" | "?*" | "?1" | "??" | "?+" | "+*" | "+1" | "+?" | "++"; description: string; subject: E[number]["type"]; type: string } & Readonly<TimeBuildObj> & { constraints: AttributeConstraint[]; final: true; options: AttributeOptions } & { cardinality: "**" | "*1" | "*?" | "*+" | "1*" | "11" | "1?" | "1+" | "?*" | "?1" | "??" | "?+" | "+*" | "+1" | "+?" | "++"; description: string; subject: E[number]["type"]; type: string } & Readonly<DatetimeBuildObj> & { constraints: AttributeConstraint[]; final: true; options: AttributeOptions } & { cardinality: "**" | "*1" | "*?" | "*+" | "1*" | "11" | "1?" | "1+" | "?*" | "?1" | "??" | "?+" | "+*" | "+1" | "+?" | "++"; description: string; subject: E[number]["type"]; type: string } & Readonly<TZTimeBuildObj> & { constraints: AttributeConstraint[]; final: true; options: AttributeOptions } & { cardinality: "**" | "*1" | "*?" | "*+" | "1*" | "11" | "1?" | "1+" | "?*" | "?1" | "??" | "?+" | "+*" | "+1" | "+?" | "++"; description: string; subject: E[number]["type"]; type: string } & Readonly<TZDatetimeBuildObj> & { constraints: AttributeConstraint[]; final: true; options: AttributeOptions } & { cardinality: "**" | "*1" | "*?" | "*+" | "1*" | "11" | "1?" | "1+" | "?*" | "?1" | "??" | "?+" | "+*" | "+1" | "+?" | "++"; description: string; subject: E[number]["type"]; type: string } & Readonly<IntervalBuildObj> & { constraints: AttributeConstraint[]; final: true; options: AttributeOptions }>[] = RelationDefinitionRawSchemaArray<E>

    • ERawSchema extends EntityRawSchema = E[number]

    Parameters

    • schema: Schema<E, R>

      The Schema abstraction class used to create this object

    • entityRawSchema: ERawSchema

      The raw entity schema

    Returns EntitySchema<E, R, ERawSchema>

Accessors

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

    Returns ERawSchema["description"]

  • get final(): ERawSchema["final"]
  • True if the current entity schema is a primitive type such as string or int

    Returns ERawSchema["final"]

  • get objectRelationsDefinitions(): RelationDefinitionSchema<E, R, MatchedRelationDefinition<E, R, { final: false; object: ERawSchema["type"] }>>[]
  • Gets the list of relation definitions schemas with this entity as object. In case a relation definition schema has this entity as both object and subject, there will be dupicates when used along with subjectRelationDefinitions.

    Returns RelationDefinitionSchema<E, R, MatchedRelationDefinition<E, R, { final: false; object: ERawSchema["type"] }>>[]

  • get subjectRelationDefinitions(): RelationDefinitionSchema<E, R, MatchedRelationDefinition<E, R, { final: false; subject: ERawSchema["type"] }>>[]
  • Gets the list of relation definitions schemas with this entity as subject. In case a relation definition schema has this entity as both object and subject, there will be dupicates when used along with objectRelationsDefinitions.

    Returns RelationDefinitionSchema<E, R, MatchedRelationDefinition<E, R, { final: false; subject: ERawSchema["type"] }>>[]

  • get type(): ERawSchema["type"]
  • The type of the entity schema. This can also be referred to as the entity schema's name.

    Returns ERawSchema["type"]

Methods

Generated using TypeDoc