ab

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2017 License: MIT Imports: 1 Imported by: 0

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

type ColumnMatch struct {
	A *db.Column
	B *db.Column
}

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

type ExtensionMatch struct {
	A *db.Extension
	B *db.Extension
}

func MatchExtensions

func MatchExtensions(a, b []db.ExtensionNode) []ExtensionMatch

type IndexMatch

type IndexMatch struct {
	A *db.Index
	B *db.Index
}

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.

Jump to

Keyboard shortcuts

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