differ

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RowsToPrimaryKeyMap

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

Types

type Diff

type Diff struct {
	Schema      *datasource.Schema `json:"schema"`
	DiffColumns *DiffColumns       `json:"diff_columns"`
	DiffRows    *DiffRows          `json:"diff_rows"`
}

func (*Diff) ExportJSON

func (d *Diff) ExportJSON() ([]byte, error)

func (*Diff) ExportPrettyJSON

func (d *Diff) ExportPrettyJSON() ([]byte, error)

func (*Diff) ExportSQL

func (d *Diff) ExportSQL() ([]byte, error)

type DiffColumns

type DiffColumns struct {
	Left  []*datasource.Column `json:"left"`
	Right []*datasource.Column `json:"right"`
}

type DiffRows

type DiffRows struct {
	Left  []*datasource.Row `json:"left"`
	Right []*datasource.Row `json:"right"`
}

type Differ

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

func NewDiffer

func NewDiffer() (*Differ, error)

func (*Differ) DiffColumns

func (d *Differ) DiffColumns(left, right *datasource.Schema) (*DiffColumns, error)

func (*Differ) DiffRows

func (d *Differ) DiffRows(schema *datasource.Schema, leftRows, rightRows []*datasource.Row) (*DiffRows, error)

func (*Differ) IsSameRow

func (d *Differ) IsSameRow(left, right *datasource.Row) (bool, error)

func (*Differ) ValueEqual

func (d *Differ) ValueEqual(lv, rv *datasource.GenericColumnValue) (bool, error)

type ValueComparator

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

Jump to

Keyboard shortcuts

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