Documentation ¶
Index ¶
- type BuildIndexOptionsInterface
- type Config
- type GormDataTypeInterface
- type Migrator
- func (m Migrator) AddColumn(value interface{}, field string) error
- func (m Migrator) AlterColumn(value interface{}, field string) error
- func (m Migrator) AutoMigrate(values ...interface{}) error
- func (m Migrator) BuildIndexOptions(opts []schema.IndexOption, stmt *gorm.Statement) (results []interface{})
- func (m Migrator) ColumnTypes(value interface{}) ([]gorm.ColumnType, error)
- func (m Migrator) CreateConstraint(value interface{}, name string) error
- func (m Migrator) CreateIndex(value interface{}, name string) error
- func (m Migrator) CreateTable(values ...interface{}) error
- func (m Migrator) CreateView(name string, option gorm.ViewOption) error
- func (m Migrator) CurrentDatabase() (name string)
- func (m Migrator) CurrentTable(stmt *gorm.Statement) interface{}
- func (m Migrator) DataTypeOf(field *schema.Field) string
- func (m Migrator) DropColumn(value interface{}, name string) error
- func (m Migrator) DropConstraint(value interface{}, name string) error
- func (m Migrator) DropIndex(value interface{}, name string) error
- func (m Migrator) DropTable(values ...interface{}) error
- func (m Migrator) DropView(name string) error
- func (m Migrator) FullDataTypeOf(field *schema.Field) (expr clause.Expr)
- func (m Migrator) GetTables() (tableList []string, err error)
- func (m Migrator) GuessConstraintAndTable(stmt *gorm.Statement, name string) (_ *schema.Constraint, _ *schema.Check, table string)
- func (m Migrator) HasColumn(value interface{}, field string) bool
- func (m Migrator) HasConstraint(value interface{}, name string) bool
- func (m Migrator) HasIndex(value interface{}, name string) bool
- func (m Migrator) HasTable(value interface{}) bool
- func (m Migrator) MigrateColumn(value interface{}, field *schema.Field, columnType gorm.ColumnType) error
- func (m Migrator) RenameColumn(value interface{}, oldName, newName string) error
- func (m Migrator) RenameIndex(value interface{}, oldName, newName string) error
- func (m Migrator) RenameTable(oldName, newName interface{}) error
- func (m Migrator) ReorderModels(values []interface{}, autoAdd bool) (results []interface{})
- func (m Migrator) RunWithValue(value interface{}, fc func(*gorm.Statement) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildIndexOptionsInterface ¶
type BuildIndexOptionsInterface interface {
BuildIndexOptions([]schema.IndexOption, *gorm.Statement) []interface{}
}
type GormDataTypeInterface ¶
type Migrator ¶
type Migrator struct {
Config
}
Migrator m struct
func (Migrator) AlterColumn ¶
func (Migrator) AutoMigrate ¶
AutoMigrate
func (Migrator) BuildIndexOptions ¶
func (m Migrator) BuildIndexOptions(opts []schema.IndexOption, stmt *gorm.Statement) (results []interface{})
func (Migrator) ColumnTypes ¶
func (m Migrator) ColumnTypes(value interface{}) ([]gorm.ColumnType, error)
ColumnTypes return columnTypes []gorm.ColumnType and execErr error
func (Migrator) CreateConstraint ¶
func (Migrator) CreateIndex ¶
func (Migrator) CreateTable ¶
func (Migrator) CreateView ¶
func (m Migrator) CreateView(name string, option gorm.ViewOption) error
func (Migrator) CurrentDatabase ¶
func (Migrator) CurrentTable ¶
func (Migrator) DropColumn ¶
func (Migrator) DropConstraint ¶
func (Migrator) FullDataTypeOf ¶
func (Migrator) GuessConstraintAndTable ¶
func (Migrator) HasConstraint ¶
func (Migrator) MigrateColumn ¶
func (Migrator) RenameColumn ¶
func (Migrator) RenameIndex ¶
func (Migrator) RenameTable ¶
func (Migrator) ReorderModels ¶
ReorderModels reorder models according to constraint dependencies
Click to show internal directories.
Click to hide internal directories.