core

package
v0.0.0-...-0420620 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrIdenticalSourceTarget = errors.New("--source and --target must be different")
)

Functions

func DiffSchemas

func DiffSchemas(env *schemadiff.Environment, inputSourceValue string, targetInputSourceValue string) (*schemadiff.SchemaDiff, error)

DiffSchemas returns a rich diff between two given schemas. Inputs can be stdin, file, directory, or MySQL URI.

func DiffTables

func DiffTables(env *schemadiff.Environment, inputSourceValue string, targetInputSourceValue string) (schemadiff.EntityDiff, error)

DiffTables returns a rich diff between two given tables. The function expect the inputs to each contain a single CREATE TABLE statement, and returns with error if not so. The two tables are allowed to have different names. Inputs can be stdin, file, directory, or MySQL URI.

func DiffViews

func DiffViews(env *schemadiff.Environment, inputSourceValue string, targetInputSourceValue string) (schemadiff.EntityDiff, error)

DiffViews returns a rich diff between two given views. The function expect the inputs to each contain a single CREATE VIEW statement, and returns with error if not so. The two views are allowed to have different names. Inputs can be stdin, file, directory, or MySQL URI.

func Exec

func Exec(ctx context.Context, command string, source string, target string, textual bool) (output string, err error)

Exec is the main execution entry for this app, called by the main() function. Teh function returns a textual output, which is later send to standard output.

func LoadSchema

func LoadSchema(env *schemadiff.Environment, inputSourceValue string) (*schemadiff.Schema, error)

LoadSchema returns a Schema, loaded from given input. The Schema is loaded, validated and normalized. Input can be stdin, file, directory, or MySQL URI.

Types

This section is empty.

Jump to

Keyboard shortcuts

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