package migrator
Import Path
gorm.io/gorm/migrator (on go.dev )
Dependency Relation
imports 8 packages , and imported by one package
Involved Source Files
migrator.go
Exported Type Names
type
Migrator (struct)
Migrator m struct
Exported Fields (4)
Config Config
Config .CreateIndexAfterCreateTable bool
Config .DB *gorm .DB
Config .Dialector gorm .Dialector
Exported Methods (35)
(T) AddColumn (value interface{}, field string ) error
(T) AlterColumn (value interface{}, field string ) error
(T) AutoMigrate (values ...interface{}) error
(T) BindVarTo (writer clause .Writer , stmt *gorm .Statement , v interface{})
(T) BuildIndexOptions (opts []schema .IndexOption , stmt *gorm .Statement ) (results []interface{})
(T) ColumnTypes (value interface{}) (columnTypes []gorm .ColumnType , err error )
(T) CreateConstraint (value interface{}, name string ) error
(T) CreateIndex (value interface{}, name string ) error
(T) CreateTable (values ...interface{}) error
(T) CreateView (name string , option gorm .ViewOption ) error
(T) CurrentDatabase () (name string )
(T) CurrentTable (stmt *gorm .Statement ) interface{}
(T) DataTypeOf (field *schema .Field ) string
(T) DefaultValueOf (*schema .Field ) clause .Expression
(T) DropColumn (value interface{}, name string ) error
(T) DropConstraint (value interface{}, name string ) error
(T) DropIndex (value interface{}, name string ) error
(T) DropTable (values ...interface{}) error
(T) DropView (name string ) error
(T) Explain (sql string , vars ...interface{}) string
(T) FullDataTypeOf (field *schema .Field ) (expr clause .Expr )
(T) HasColumn (value interface{}, field string ) bool
(T) HasConstraint (value interface{}, name string ) bool
(T) HasIndex (value interface{}, name string ) bool
(T) HasTable (value interface{}) bool
(T) Initialize (*gorm .DB ) error
(T) MigrateColumn (value interface{}, field *schema .Field , columnType gorm .ColumnType ) error
(T) Migrator (db *gorm .DB ) gorm .Migrator
(T) Name () string
(T) QuoteTo (clause .Writer , string )
(T) RenameColumn (value interface{}, oldName, newName string ) error
(T) RenameIndex (value interface{}, oldName, newName string ) error
(T) RenameTable (oldName, newName interface{}) error
(T) ReorderModels (values []interface{}, autoAdd bool ) (results []interface{})
(T) RunWithValue (value interface{}, fc func(*gorm .Statement ) error ) error
Implements (4+)
T : BuildIndexOptionsInterface
T : gorm.io/gorm.Dialector
T : gorm.io/gorm.Migrator
T : gorm.io/gorm.Plugin
The pages are generated with Golds v0.1.6 . (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project and developed by Tapir Liu .
PR and bug reports are welcome and can be submitted to the issue list .
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds .