Class DepcyGraph
java.lang.Object
org.pgcodekeeper.core.model.graph.DepcyGraph
Database dependency graph for managing object relationships and dependencies.
Builds directed graph of database objects with support for cycle detection and resolution.
Handles foreign key relationships, inheritance, and partitioning dependencies.
-
Constructor Summary
ConstructorsConstructorDescriptionDepcyGraph(IDatabase graphSrc) Creates a dependency graph from the database schema.DepcyGraph(IDatabase graphSrc, boolean reduceGraph) Creates a dependency graph with optional graph reduction. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCustomDepcies(List<Map.Entry<IStatement, IStatement>> depcies) Adds custom dependencies to the graph.getDb()Copied database, graph source.
Do not modify any elements in this as it will break HashSets/HashMaps and with them the generated graph.org.jgrapht.Graph<IStatement,org.jgrapht.graph.DefaultEdge> getGraph()Gets the dependency graph.org.jgrapht.graph.EdgeReversedGraph<IStatement,org.jgrapht.graph.DefaultEdge>
-
Constructor Details
-
DepcyGraph
Creates a dependency graph from the database schema.- Parameters:
graphSrc- the source database to build graph from
-
DepcyGraph
Creates a dependency graph with optional graph reduction.- Parameters:
graphSrc- the source database to build graph fromreduceGraph- if true, merge column nodes into table nodes
-
-
Method Details
-
getGraph
Gets the dependency graph. Graph direction: dependent object → dependency (source → target)- Returns:
- the dependency graph
-
getReversedGraph
public org.jgrapht.graph.EdgeReversedGraph<IStatement,org.jgrapht.graph.DefaultEdge> getReversedGraph() -
getDb
Copied database, graph source.
Do not modify any elements in this as it will break HashSets/HashMaps and with them the generated graph. -
addCustomDepcies
Adds custom dependencies to the graph.- Parameters:
depcies- list of custom dependency pairs to add
-