Options
All
  • Public
  • Public/Protected
  • All
Menu

Orders insert or remove subjects in proper order (using topological sorting) to make sure insert or remove operations are executed in a proper order.

Hierarchy

  • SubjectTopoligicalSorter

Index

Constructors

constructor

Properties

metadatas

metadatas: EntityMetadata[]

Unique list of entity metadatas of this subject.

subjects

subjects: Subject[]

Insert subjects needs to be sorted.

Methods

Protected getDependencies

  • getDependencies(): string[][]
  • Gets dependency tree for all entity metadatas with non-nullable relations. We need to execute insertions first for entities which non-nullable relations.

    Returns string[][]

Protected getNonNullableDependencies

  • getNonNullableDependencies(): string[][]
  • Gets dependency tree for all entity metadatas with non-nullable relations. We need to execute insertions first for entities which non-nullable relations.

    Returns string[][]

Protected getUniqueMetadatas

Protected removeAlreadySorted

  • removeAlreadySorted(subjects: Subject[]): void

sort

  • sort(direction: "insert" | "delete"): Subject[]

Protected toposort

  • toposort(edges: any[][]): any[]

Generated using TypeDoc