Documentation ¶
Overview ¶
Package diff contains functions to generate SQL statements to migrate an old schema to the new schema
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Files ¶
Files compares contents of two files and generates a series of statements to migrate from the old one to the new one, writing the result to `dst`
func Statements ¶
Statements compares two model.Stmts and generates a series of statements to migrate from the old one to the new one, writing the result to `dst`
Types ¶
type Option ¶
type Option interface { Name() string Value() interface{} }
Option is a generic interface for objects that passes optional parameters to the various diff functions in this package
func WithParser ¶
WithParser specifies the parser instance to use when parsing the statements given to the diffing functions. If unspecified, a default parser will be used
func WithTransaction ¶
WithTransaction specifies if statements to control transactions should be included in the diff.