tabledependency

package
v0.4.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2024 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConstraintColumns

type ConstraintColumns struct {
	NullableColumns    []string
	NonNullableColumns []string
}

type DependsOn

type DependsOn struct {
	Table   string
	Columns []string
}

type OrderedTablesResult

type OrderedTablesResult struct {
	OrderedTables []string
	HasCycles     bool
}

func GetTablesOrderedByDependency

func GetTablesOrderedByDependency(dependencyMap map[string][]string) (*OrderedTablesResult, error)

type RunConfig

type RunConfig struct {
	Table       string // schema.table
	Columns     []string
	DependsOn   []*DependsOn
	RunType     RunType
	PrimaryKeys []string
	WhereClause *string
}

func GetRunConfigs

func GetRunConfigs(
	dependencyMap map[string][]*sql_manager.ForeignConstraint,
	tables []string,
	subsets map[string]string,
	primaryKeyMap map[string][]string,
	tableColumnsMap map[string][]string,
) ([]*RunConfig, error)

type RunType

type RunType string
const (
	RunTypeUpdate RunType = "update"
	RunTypeInsert RunType = "insert"
)

type TableColumn

type TableColumn struct {
	Schema  string
	Table   string
	Columns []string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL