differ

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RowsToPrimaryKeyMap

func RowsToPrimaryKeyMap(schema *driver.Schema, rows []*driver.Row) (map[string]*driver.Row, error)

Types

type ComparatorMap added in v0.3.0

type ComparatorMap map[driver.ColumnType]ValueComparator

func NewComparatorMap added in v0.3.0

func NewComparatorMap() ComparatorMap

func (ComparatorMap) Equal added in v0.3.0

func (cmap ComparatorMap) Equal(v1, v2 *driver.GenericColumnValue) (bool, error)

type Diff

type Diff struct {
	DiffColumns *DiffColumns
	DiffRows    *DiffRows
}

func (*Diff) HasDiff added in v0.0.2

func (d *Diff) HasDiff() bool

type DiffColumns

type DiffColumns struct {
	Left  []*driver.Column
	Right []*driver.Column
}

func (*DiffColumns) HasDiff added in v0.0.2

func (dc *DiffColumns) HasDiff() bool

type DiffRows

type DiffRows struct {
	Left  []*driver.Row
	Right []*driver.Row
}

func (*DiffRows) HasDiff added in v0.0.2

func (dr *DiffRows) HasDiff() bool

type Differ

type Differ struct {
	// contains filtered or unexported fields
}

func NewDiffer

func NewDiffer(opts ...DifferOption) (*Differ, error)

func (*Differ) Diff added in v0.3.0

func (d *Differ) Diff(schema1, schema2 *driver.Schema, rows1, rows2 []*driver.Row) (*Diff, error)

func (*Differ) DiffColumns deprecated

func (d *Differ) DiffColumns(schema1, schema2 *driver.Schema) (*DiffColumns, error)

Deprecated:

func (*Differ) DiffRows deprecated

func (d *Differ) DiffRows(schema1 *driver.Schema, rows1, rows2 []*driver.Row) (*DiffRows, error)

Deprecated:

type DifferOption added in v0.3.0

type DifferOption func(*Differ) error

func IgnoreColumn added in v0.0.2

func IgnoreColumn(name string) DifferOption

type ValueComparator

type ValueComparator interface {
	Equal(v1, v2 *driver.GenericColumnValue) (bool, error)
}

Jump to

Keyboard shortcuts

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