Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAlreadyExists = errors.New("failed to build hierarchy as it already exists")
Functions ¶
func CreateCSV ¶
CreateCSV creates a CSV representation of the given nodes and writes it to the given file.
func CreateCSVFile ¶
CreateCSVFile generates hierarchy csv content and writes it to the given file.
Types ¶
type Node ¶
type Node struct { Level int Code string CodeList string ParentCode string Label string LabelCode string ParentLabelCode string Children []*Node }
Node represents a single node in a hierarchy, linking to child nodes.
func IdentifyRootNodes ¶
IdentifyRootNodes returns a slice of nodes from the given map that have no parent.
type Store ¶
type Store struct {
DB
}
Store represents storage for hierarchy data.
func (*Store) BuildHierarchy ¶
BuildHierarchy clones the necessary generic hierarchy subgraph, according to the existing codes in the nodes for instanceID and dimensionName
Click to show internal directories.
Click to hide internal directories.