Documentation ¶
Index ¶
- type Dialector
- func (d Dialector) BindVarTo(writer clause.Writer, stmt *gorm.Statement, _ interface{})
- func (d Dialector) ClauseBuilders() map[string]clause.ClauseBuilder
- 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) error
- func (d Dialector) Migrator(db *gorm.DB) gorm.Migrator
- func (d Dialector) Name() string
- func (d Dialector) QuoteTo(writer clause.Writer, s string)
- type Migrator
- func (m Migrator) AddColumn(value interface{}, name string) error
- func (m Migrator) AlterColumn(_ interface{}, field string) error
- func (m Migrator) ColumnTypes(value interface{}) ([]gorm.ColumnType, error)
- func (m Migrator) CreateTable(values ...interface{}) error
- func (m Migrator) DropColumn(value interface{}, name string) error
- func (m Migrator) DropTable(models ...interface{}) error
- func (m Migrator) FullDataTypeOf(field *schema.Field) (expr clause.Expr)
- func (m Migrator) HasTable(model interface{}) bool
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dialector ¶
Dialector is implementation of gorm.Dialector.
func (Dialector) ClauseBuilders ¶
func (d Dialector) ClauseBuilders() map[string]clause.ClauseBuilder
func (Dialector) DefaultValueOf ¶
func (d Dialector) DefaultValueOf(_ *schema.Field) clause.Expression
type Migrator ¶
Migrator is wrapper for gorm.Migrator.
func (Migrator) AlterColumn ¶
AlterColumn alter value's `field` column type based on schema definition.
func (Migrator) ColumnTypes ¶
func (m Migrator) ColumnTypes(value interface{}) ([]gorm.ColumnType, error)
ColumnTypes return columnTypes []gorm.ColumnType and execErr error.
func (Migrator) CreateTable ¶
CreateTable create table in database for values.
func (Migrator) DropColumn ¶
DropColumn drop value's `name` column.
func (Migrator) FullDataTypeOf ¶
FullDataTypeOf returns field's db full data type.
type Option ¶
type Option func(d *Dialector)
Option is option for Dialector New constructor.
func WithConnMaxIdleTime ¶
WithConnMaxIdleTime apply max idle time to Dialector.
func WithMaxIdleConns ¶
WithMaxIdleConns apply max idle conns to Dialector.
func WithMaxOpenConns ¶
WithMaxOpenConns apply max open conns to Dialector.
func WithTablePathPrefix ¶
WithTablePathPrefix apply table path prefix to Dialector.