Versions in this module Expand all Collapse all v1 v1.0.1 Aug 15, 2024 Changes in this version + var CharsetCollatePat = `(?mi)(?P<charset_expr>(?:default\s+)?(?:CHARACTER\s+SET|CHARSET)(?:\s*=?\s*|\s+)(?P<charset_value>[A-Za-z0-9_]+))|(?P<collate_expr>COLLATE(?:\s*=?\s*|\s+)(?P<collate_value>[A-Za-z0-9_]+))` + var CharsetCollateRe = regexp.MustCompile(CharsetCollatePat, regexp.IgnoreCase | regexp.Multiline | regexp.RE2) + func CharsetWhite() []string + func IsCannotAddOrUpdateAChildRowError(e error) bool + func MaxSamplingSize() uint64 + func ParseCreateTableStmt(create string) (*ast.CreateTableStmt, error) + func Sampling() bool + func TrimBlockFormat(create string) string + func TrimCharacterSetFromRawCreateTableSQL(create string, except ...string) string + func TrimCollateOptionFromCols(create *ast.CreateTableStmt) + func TrimCollateOptionFromCreateTable(create *ast.CreateTableStmt) + func TrimConstraintCheckFromCreateTable(create *ast.CreateTableStmt) + func TrimInvalidCollate(create string) string + type Snapshot struct + func From(tx *gorm.DB, ignore ...string) (s *Snapshot, err error) + func (s *Snapshot) DDLNodes() []ast.DDLNode + func (s *Snapshot) Dump(tableName string, lines uint64) ([]map[string]interface{}, uint64, error) + func (s *Snapshot) HasAnyTable() bool + func (s *Snapshot) RecoverTo(tx *gorm.DB) error + func (s *Snapshot) TableNames() []string