Documentation ¶
Index ¶
- Variables
- func DiffSchemas(env *schemadiff.Environment, inputSourceValue string, ...) (*schemadiff.SchemaDiff, error)
- func DiffTables(env *schemadiff.Environment, inputSourceValue string, ...) (schemadiff.EntityDiff, error)
- func DiffViews(env *schemadiff.Environment, inputSourceValue string, ...) (schemadiff.EntityDiff, error)
- func Exec(ctx context.Context, command string, source string, target string, ...) (output string, err error)
- func LoadSchema(env *schemadiff.Environment, inputSourceValue string) (*schemadiff.Schema, error)
Constants ¶
This section is empty.
Variables ¶
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.