Documentation
¶
Index ¶
- func SetSubsetQueries(graph *Graph) error
- type Component
- type ComponentLink
- type CondensedEdge
- type CycleEdge
- type Edge
- type Graph
- func (g *Graph) GetCycledTables() (res [][]string)
- func (g *Graph) GetCycles() [][]*Edge
- func (g *Graph) GetSortedTablesAndDependenciesGraph() ([]toolkit.Oid, map[toolkit.Oid][]toolkit.Oid)
- func (g *Graph) GetTables() []*entries.Table
- func (g *Graph) ReversedGraph() [][]*Edge
- func (g *Graph) Tables() []*entries.Table
- type Key
- type Path
- type ScopeEdge
- type TableLink
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetSubsetQueries ¶
Types ¶
type ComponentLink ¶
type ComponentLink struct {
// contains filtered or unexported fields
}
func NewComponentLink ¶
func NewComponentLink(idx int, c *Component) *ComponentLink
type CondensedEdge ¶
type CondensedEdge struct {
// contains filtered or unexported fields
}
func NewCondensedEdge ¶
func NewCondensedEdge(id int, from, to *ComponentLink, originalEdge *Edge) *CondensedEdge
type Edge ¶
type Edge struct {
// contains filtered or unexported fields
}
func (*Edge) IsNullable ¶ added in v0.2.1
type Graph ¶
type Graph struct {
// contains filtered or unexported fields
}
Graph - the graph representation of the DB tables. Is responsible for finding the cycles in the graph and searching subset Path for the tables
func NewGraph ¶
func NewGraph( ctx context.Context, tx pgx.Tx, tables []*entries.Table, vr []*domains.VirtualReference, ) (*Graph, error)
NewGraph creates a new graph based on the provided tables by finding the references in DB between them
func (*Graph) GetCycledTables ¶
func (*Graph) GetSortedTablesAndDependenciesGraph ¶
func (g *Graph) GetSortedTablesAndDependenciesGraph() ([]toolkit.Oid, map[toolkit.Oid][]toolkit.Oid)
GetSortedTablesAndDependenciesGraph - returns the sorted tables in topological order and the dependencies graph where the key is the table OID and the value is the list of table OIDs that depend on the key table
func (*Graph) ReversedGraph ¶ added in v0.2.1
type Key ¶
func NewKeysByColumn ¶
func NewKeysByReferencedColumn ¶
func NewKeysByReferencedColumn(cols []*domains.ReferencedColumn) []*Key
type Path ¶
type Path struct {
// contains filtered or unexported fields
}
type TableLink ¶
type TableLink struct {
// contains filtered or unexported fields
}
func NewTableLink ¶
func (*TableLink) PolymorphicExprs ¶ added in v0.2.1
Click to show internal directories.
Click to hide internal directories.