queries

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountRows

func CountRows(db *goqu.Database, tableName string) (int, error)

CountRows counts the rows in given table.

func DeleteAllRows

func DeleteAllRows(db *goqu.Database, tableName string) error

DeleteAllRows deletes all rows from a table.

func Insert

func Insert(db *goqu.Database, tableName string, data *datatable.DataTable) error

Insert inserts all rows in the datatable into the given table.

Types

type DiffResult

type DiffResult struct {
	Matching, Missing, Additional *datatable.DataTable
}

DiffResult is a container for datatables of matching, missing and additional rows.

func Diff

func Diff(db *goqu.Database, tableName string, expected *datatable.DataTable) (*DiffResult, error)

Diff queries for all rows in given table and returns a DiffResult with matching, missing and additional rows.

Jump to

Keyboard shortcuts

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