Documentation
¶
Index ¶
- func Init()
- func New(config Config) gorm.Dialector
- func Open(dsn string) gorm.Dialector
- type Config
- type Dialector
- func (d Dialector) BindVarTo(writer clause.Writer, stmt *gorm.Statement, v interface{})
- func (d Dialector) DataTypeOf(field *schema.Field) string
- func (d Dialector) DefaultValueOf(*schema.Field) clause.Expression
- func (d Dialector) Explain(sql string, vars ...interface{}) string
- func (d Dialector) Initialize(db *gorm.DB) (err error)
- func (d Dialector) Migrator(db *gorm.DB) gorm.Migrator
- func (d Dialector) Name() string
- func (d Dialector) QuoteTo(writer clause.Writer, str string)
- type FieldConvertType
- type Migrator
- func (m Migrator) AddColumn(value interface{}, field string) error
- func (m Migrator) AlterColumn(value interface{}, field string) error
- func (m Migrator) CreateConstraint(value interface{}, name string) error
- func (m Migrator) CreateTable(values ...interface{}) error
- func (m Migrator) CurrentDatabase() (name 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) 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) RenameIndex(value interface{}, oldName, newName string) error
- func (m Migrator) RenameTable(oldName, newName interface{}) (err error)
- func (m Migrator) TryQuotifyReservedWords(values []interface{}) error
- func (m Migrator) TryRemoveOnUpdate(value interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dialector ¶
type Dialector struct {
*Config
}
func (Dialector) DefaultValueOf ¶
func (d Dialector) DefaultValueOf(*schema.Field) clause.Expression
type FieldConvertType ¶
type FieldConvertType int8
const ( None FieldConvertType = iota //不转换 ToUpperCase //转换为大写 ToLowerCase //转换为小写 Custom //自定义转换 )
type Migrator ¶
TODO 未实现
func (Migrator) AlterColumn ¶
func (Migrator) CreateConstraint ¶
func (Migrator) CreateTable ¶
func (Migrator) CurrentDatabase ¶
func (Migrator) DropColumn ¶
func (Migrator) DropConstraint ¶
func (Migrator) HasConstraint ¶
func (Migrator) RenameTable ¶
func (Migrator) TryQuotifyReservedWords ¶
func (Migrator) TryRemoveOnUpdate ¶
Click to show internal directories.
Click to hide internal directories.