Documentation
¶
Overview ¶
ab package is used to combine two separate database trees into a combined tree where each element is matched with the desired A and existing B representations.
Important: A = new, B = old.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColumnMatch ¶
ColumnMatch is a combined column with new version A and old version B.
func MatchColumns ¶
func MatchColumns(a, b []db.ColumnNode) []ColumnMatch
MatchColumnNodes takes separate column node lists, and combines them by column name.
type DatabaseMatch ¶
type DatabaseMatch struct {
ExtensionMatches []ExtensionMatch
SchemaMatches []SchemaMatch
}
func MatchDatabase ¶
func MatchDatabase(a, b db.DatabaseNode) DatabaseMatch
type ExtensionMatch ¶
func MatchExtensions ¶
func MatchExtensions(a, b []db.ExtensionNode) []ExtensionMatch
type IndexMatch ¶
func MatchIndexes ¶
func MatchIndexes(a, b []db.IndexNode) []IndexMatch
type SchemaMatch ¶
type SchemaMatch struct {
A *db.Schema
B *db.Schema
TableMatches []TableMatch
}
SchemaMatch is a combined schema with the new version A and old version B.
func MatchSchemas ¶
func MatchSchemas(a, b []db.SchemaNode) []SchemaMatch
MatchSchemaNodes takes separate SchemaNode lists, and deep merges them into one combined SchemaMatch list.
type TableMatch ¶
type TableMatch struct {
A *db.Table
B *db.Table
ColumnMatches []ColumnMatch
IndexMatches []IndexMatch
}
TableMatch is a combined table with new version A and old version B.
func MatchTables ¶
func MatchTables(a, b []db.TableNode) []TableMatch
MatchTableNodes takes separate TableNode lists, and deep merges them by table name into one combined TableMatch list.