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 ¶ added in v0.1.0
Dialector is implementation of gorm.Dialector.
func (Dialector) ClauseBuilders ¶ added in v0.1.0
func (d Dialector) ClauseBuilders() map[string]clause.ClauseBuilder
func (Dialector) DataTypeOf ¶ added in v0.1.0
func (Dialector) DefaultValueOf ¶ added in v0.1.0
func (d Dialector) DefaultValueOf(_ *schema.Field) clause.Expression
type Migrator ¶ added in v0.1.0
Migrator is wrapper for gorm.Migrator.
func (Migrator) AlterColumn ¶ added in v0.1.0
AlterColumn alter value's `field` column type based on schema definition.
func (Migrator) ColumnTypes ¶ added in v0.1.0
func (m Migrator) ColumnTypes(value interface{}) ([]gorm.ColumnType, error)
ColumnTypes return columnTypes []gorm.ColumnType and execErr error.
func (Migrator) CreateTable ¶ added in v0.1.0
CreateTable create table in database for values.
func (Migrator) DropColumn ¶ added in v0.1.0
DropColumn drop value's `name` column.
func (Migrator) FullDataTypeOf ¶ added in v0.1.0
FullDataTypeOf returns field's db full data type.
type Option ¶
type Option func(d *Dialector)
Option is option for Dialector New constructor.
func WithConnMaxIdleTime ¶ added in v0.1.0
WithConnMaxIdleTime apply max idle time to Dialector.
func WithMaxIdleConns ¶ added in v0.1.0
WithMaxIdleConns apply max idle conns to Dialector.
func WithMaxOpenConns ¶ added in v0.1.0
WithMaxOpenConns apply max open conns to Dialector.
func WithTablePathPrefix ¶
WithTablePathPrefix apply table path prefix to Dialector.