Documentation ¶
Index ¶
- Constants
- func CleanUpLine(s []string) []string
- func CleanUpString(s string) string
- func Contains(s []string, e string) bool
- func GetDryRun() bool
- func GetLogger() *slog.Logger
- func GetVerbose() bool
- func PrintStruct(object interface{})
- func RemoveComments(s []string) []string
- func RemoveConstraints(s []string) []string
- func SetDryRun(d bool)
- func SetLogger(level slog.Level)
- func SetVerbose(v bool)
- func SplitAndGetFields(raw string) []string
- func Unquote(raw string) string
Constants ¶
View Source
const ( TableRegexp = `CREATE TABLE(?: IF NOT EXISTS)? (?P<tableName>\w+.\w+) \((?P<tableFields>.+)\)` FieldRegexp = `^\s*(\w+)\s+([a-zA-Z0-9_ ]*)(?:\((\d+)\))?` InTablePkRegexp = `PRIMARY\s+KEY\s+\((.*?)\)` StandaloneFkRegexp = `` /* 144-byte string literal not displayed */ StandalonePkRegex = `ALTER\s+TABLE\s+(?:ONLY\s+)?(\w+.?\w+)\s+ADD\s+CONSTRAINT\s+\w+\s+PRIMARY\s+KEY\s+\(([\w\s,]+)\)` ConstraintRemovalRegexp = `^\s*CREATE INDEX.*` IndexRemovalRegexp = `^\s*CONSTRAINT.*` )
Variables ¶
This section is empty.
Functions ¶
func CleanUpLine ¶
func CleanUpString ¶
func GetVerbose ¶
func GetVerbose() bool
func PrintStruct ¶
func PrintStruct(object interface{})
func RemoveComments ¶
func RemoveConstraints ¶
func SetVerbose ¶
func SetVerbose(v bool)
func SplitAndGetFields ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.