snapshot

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseCreateTableStmt added in v1.3.0

func ParseCreateTableStmt(create string) (*ast.CreateTableStmt, error)

ParseCreateTableStmt parses CreateTableStmt as *ast.CreateTableStmt node

func TrimCharacterSetFromRawCreateTableSQL

func TrimCharacterSetFromRawCreateTableSQL(sql string) string

func TrimCollateOptionFromCols

func TrimCollateOptionFromCols(create *ast.CreateTableStmt)

func TrimCollateOptionFromCreateTable

func TrimCollateOptionFromCreateTable(create *ast.CreateTableStmt)

func TrimConstraintCheckFromCreateTable

func TrimConstraintCheckFromCreateTable(create *ast.CreateTableStmt)

Types

type Snapshot

type Snapshot struct {
	// contains filtered or unexported fields
}

func From

func From(tx *gorm.DB, ignore ...string) (s *Snapshot, err error)

func (*Snapshot) DDLNodes

func (s *Snapshot) DDLNodes() []ast.DDLNode

func (*Snapshot) HasAnyTable

func (s *Snapshot) HasAnyTable() bool

func (*Snapshot) RecoverTo

func (s *Snapshot) RecoverTo(tx *gorm.DB) error

func (*Snapshot) TableNames

func (s *Snapshot) TableNames() []string

Jump to

Keyboard shortcuts

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