dbcomparer

package module
v0.0.0-...-f4756e1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBComparer

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

func New

func New(poolGetter PoolGetter, connString string) *DBComparer

func (*DBComparer) Compare

func (c *DBComparer) Compare(datasetFile string, orderBy, ignoreColumns map[Table][]string) (matched bool, err error)

type DBData

type DBData map[Table][]map[string]FieldValue

type Field

type Field struct {
	Name string
	Type uint32
}

type FieldValue

type FieldValue struct {
	Value interface{}
	Type  uint32
}

type PgxIface

type PgxIface interface {
	Begin(context.Context) (pgx.Tx, error)
	BeginTx(ctx context.Context, txOptions pgx.TxOptions) (pgx.Tx, error)
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
	Ping(context.Context) error
	Acquire(ctx context.Context) (*pgxpool.Conn, error)
	Close()
	Stat() *pgxpool.Stat
}

type PoolGetter

type PoolGetter func(ctx context.Context, connStr string) (PgxIface, error)

type Table

type Table string

type YAMLData

type YAMLData map[Table]interface{}

func (YAMLData) GetTableNames

func (y YAMLData) GetTableNames() []Table

Jump to

Keyboard shortcuts

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