tabledependency

package
v0.4.71 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetermineCycleStarts added in v0.4.24

func DetermineCycleStarts(
	cycles [][]string,
	subsets map[string]string,
	dependencyMap map[string][]*sqlmanager_shared.ForeignConstraint,
) ([]string, error)

func FindCircularDependencies added in v0.4.24

func FindCircularDependencies(dependencies map[string][]string) [][]string

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 {
	// contains filtered or unexported fields
}

func GetRunConfigs

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

func NewRunConfig added in v0.4.59

func NewRunConfig(
	table string,
	runtype RunType,
	primaryKeys []string,
	whereClause *string,
	selectCols, insertCols []string,
	dependsOn []*DependsOn,
	splitColumnPaths bool,
) *RunConfig

func (*RunConfig) DependsOn

func (rc *RunConfig) DependsOn() []*DependsOn

func (*RunConfig) InsertColumns added in v0.4.23

func (rc *RunConfig) InsertColumns() []string

func (*RunConfig) PrimaryKeys

func (rc *RunConfig) PrimaryKeys() []string

func (*RunConfig) RunType

func (rc *RunConfig) RunType() RunType

func (*RunConfig) SelectColumns added in v0.4.23

func (rc *RunConfig) SelectColumns() []string

func (*RunConfig) SelectQuery added in v0.4.23

func (rc *RunConfig) SelectQuery() *string

func (*RunConfig) SetSelectQuery added in v0.4.59

func (rc *RunConfig) SetSelectQuery(query *string)

func (*RunConfig) SplitColumnPaths added in v0.4.51

func (rc *RunConfig) SplitColumnPaths() bool

func (*RunConfig) Table

func (rc *RunConfig) Table() string

func (*RunConfig) WhereClause

func (rc *RunConfig) WhereClause() *string

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