Documentation ¶
Overview ¶
本方言包基于gorm v1.24.2开发,需要配合达梦数据库驱动使用
Index ¶
- Variables
- func Create(db *gorm.DB)
- func MergeCreate(db *gorm.DB, onConflict clause.OnConflict, values clause.Values)
- 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)
- func (d Dialector) RollbackTo(tx *gorm.DB, name string) error
- func (d Dialector) SavePoint(tx *gorm.DB, name string) error
- type Index
- type Migrator
- func (m Migrator) AddColumn(dst interface{}, field string) error
- func (m Migrator) AlterColumn(value interface{}, field string) error
- func (m Migrator) AutoMigrate(dst ...interface{}) error
- func (m Migrator) ColumnTypes(dst interface{}) ([]gorm.ColumnType, error)
- func (m Migrator) CreateConstraint(dst interface{}, name string) error
- func (m Migrator) CreateIndex(dst 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) DropColumn(dst interface{}, field 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) clause.Expr
- func (m Migrator) GetIndexes(value interface{}) ([]gorm.Index, error)
- func (m Migrator) GetTables() (tableList []string, err error)
- func (m Migrator) GetTypeAliases(databaseTypeName string) []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(dst 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
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // CreateClauses create clauses CreateClauses = []string{"INSERT", "VALUES", "ON CONFLICT"} // QueryClauses query clauses QueryClauses = []string{} // UpdateClauses update clauses UpdateClauses = []string{"UPDATE", "SET", "WHERE", "ORDER BY", "LIMIT"} // DeleteClauses delete clauses DeleteClauses = []string{"DELETE", "FROM", "WHERE", "ORDER BY", "LIMIT"} )
Functions ¶
func MergeCreate ¶
Types ¶
type Dialector ¶
type Dialector struct {
*Config
}
func (Dialector) DefaultValueOf ¶
func (d Dialector) DefaultValueOf(*schema.Field) clause.Expression
type Migrator ¶
func (Migrator) AlterColumn ¶
func (Migrator) AutoMigrate ¶
func (Migrator) ColumnTypes ¶
func (m Migrator) ColumnTypes(dst interface{}) ([]gorm.ColumnType, 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) DropColumn ¶
func (Migrator) DropConstraint ¶
func (Migrator) GetTypeAliases ¶
func (Migrator) HasConstraint ¶
func (Migrator) MigrateColumn ¶
func (Migrator) RenameColumn ¶
func (Migrator) RenameIndex ¶
func (Migrator) RenameTable ¶
Click to show internal directories.
Click to hide internal directories.