Class Schema<E, R>

Wrapper around the raw JSON Schema. It is recommended to use this class instead of the raw JSON Schema as it is more robust to schema changes and provides utility functions.

Type Parameters

Hierarchy

  • Schema

Constructors

  • Wrapper around the raw JSON Schema. It is recommended to use this class instead of the raw JSON Schema as it is more robust to schema changes and provides utility functions.

    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>

    Parameters

    • rawSchema: RawSchema<E, R>

      The raw JSON schema to create the wrapper from.

    Returns Schema<E, R>

Accessors

  • get entities(): EntitySchema<E, R, E[number]>[]
  • Returns the list of entity schemas in the schema using the EntitySchema abstraction class.

    Returns EntitySchema<E, R, E[number]>[]

  • get relationsDefinitions(): RelationDefinitionSchema<E, R, R[number]>[]
  • Returns the list of relation definitions schemas in the schema using the RelationDefinitionSchema abstraction class.

    Returns RelationDefinitionSchema<E, R, R[number]>[]

Methods

Generated using TypeDoc