Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OrderFromSchema ¶
func OrderFromSchema( enums *orderedmap.Map[string, *model.Enum], domains *orderedmap.Map[string, *model.Domain], compositeTypes *orderedmap.Map[string, *model.CompositeType], tables *orderedmap.Map[string, *model.Table], views *orderedmap.Map[string, *model.View], sequences *orderedmap.Map[string, *model.Sequence], routines *orderedmap.Map[string, *model.Routine], ) ([]string, error)
OrderFromSchema builds a dependency graph from parsed model objects and returns the object names in topological order (dependencies first). Sequences are leaf nodes; a table depends on a sequence when a column default references it via nextval, so the sequence is created first.
func RoutineNode ¶ added in v1.30.0
RoutineNode returns the graph node name for a routine, given its schema-qualified name. The identity argument list is left out, so an overload set shares one node: the ordering rules below hold for every overload alike, and a CREATE statement spells its parameters with names and defaults, which no FQRN could be recovered from.
The "routine:" prefix keeps the node out of the relation and type namespace. A schema may hold a table and a function of the same name, and without the prefix the two would collapse into one node and read as a cycle.
Types ¶
This section is empty.