Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateDependencyClosure ¶
func ValidateDependencyClosure( graph DependencyGraph, selected map[string]struct{}, includeRequired bool, includeOptional bool, ) error
ValidateDependencyClosure validates input and returns an error on failure.
Types ¶
type DependencyEdge ¶
type DependencyEdge struct {
FromTable string
ToTable string
FK ForeignKey
}
type DependencyGraph ¶
type DependencyGraph struct {
TableByName map[string]Table
Out map[string][]DependencyEdge
In map[string][]DependencyEdge
}
func BuildDependencyGraph ¶
func BuildDependencyGraph(tables []Table) (DependencyGraph, error)
BuildDependencyGraph builds and returns the resulting value.
type ForeignKey ¶
type SelectionOptions ¶
type SelectionResult ¶
type SelectionResult struct {
Tables []Table
Selected map[string]struct{}
AddedRequired []string
AddedOptional []string
}
func ResolveSelection ¶
func ResolveSelection(tables []Table, options SelectionOptions) (SelectionResult, error)
ResolveSelection resolves dependencies for the requested value.
Click to show internal directories.
Click to hide internal directories.