Documentation
¶
Index ¶
- func BuildEntityDependencyGraph(entities map[string]parser.Entity, ...) (graph.Graph[string, string], error)
- func CleanNameForFilename(name string) string
- func GetTopologicalOrder(entityGraph graph.Graph[string, string]) ([]string, error)
- func ParseEntityAttribute(entities map[string]parser.Entity, attributeRef string, ...) (entityID string, attrName string, uniqueID bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildEntityDependencyGraph ¶
func BuildEntityDependencyGraph( entities map[string]parser.Entity, relationships map[string]parser.Relationship, preventCycles bool, ) (graph.Graph[string, string], error)
BuildEntityDependencyGraph creates a directed graph of entity dependencies based on the relationships in the SOR definition. This shared utility is used by both the CSV generator and ER diagram generator.
func CleanNameForFilename ¶
CleanNameForFilename creates a filesystem-safe name from a display name
func GetTopologicalOrder ¶
GetTopologicalOrder returns a topologically sorted list of entity IDs Entities will be sorted such that if entity A depends on entity B, entity B will appear earlier in the list.
func ParseEntityAttribute ¶
func ParseEntityAttribute( entities map[string]parser.Entity, attributeRef string, attributeAliasMap map[string]struct { EntityID string AttributeName string UniqueID bool }, entityAttributeMap map[string]struct { EntityID string AttributeName string UniqueID bool }, ) (entityID string, attrName string, uniqueID bool)
ParseEntityAttribute is a helper function to extract entity and attribute info from a reference Public version of parseEntityAttribute that can be used across packages
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.