comparer

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comparer

type Comparer interface {
	Compare(ctx context.Context)
}

Comparer is a type capable of comparing two entities.

func NewDatabaseComparer

func NewDatabaseComparer(resource1, resource2 string, verbosity int) Comparer

NewDatabaseComparer returns a new database comparer given two resources as connection strings or data file paths.

func NewFileComparer

func NewFileComparer(resource1, resource2 string) Comparer

NewFileComparer creates a new fileComparer.

type Difference

type Difference struct {
	Name, Value1, Value2 string
}

Difference is a type capable of holding an identified by name entity values in compared entities. For example, a name of a table field with values in database1 and database2.

func NewFieldsDifference

func NewFieldsDifference(f1, f2 *field.Field, mixedDBTypes bool) *Difference

NewFieldsDifference returns two field.Field objects schemas Difference.

type Differences

type Differences []*Difference

func NewDataRowDifferences

func NewDataRowDifferences(r1, r2 row.Row, t table.Table, verbose bool) (Differences, bool, error)

func (Differences) Format

func (d Differences) Format(verbose bool) string

Format returns differences formatted depending on the verbosity level.

Jump to

Keyboard shortcuts

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