Versions in this module Expand all Collapse all v0 v0.0.3 Oct 13, 2024 v0.0.2 Jun 9, 2024 Changes in this version + var ErrCreateIndexFailed = errors.New("failed to create index with name") + var ErrRenameColumnUnsupported = errors.New("renaming column is not supported in your clickhouse version < 20.4") + var ErrRenameIndexUnsupported = errors.New("renaming index is not supported") + func New(config Config) gorm.Dialector + func Open(dsn string) gorm.Dialector + type Config struct + Conn gorm.ConnPool + DSN string + DefaultCompression string + DefaultGranularity int + DefaultIndexType string + DefaultTableEngineOpts string + DisableDatetimePrecision bool + DontSupportColumnPrecision bool + DontSupportEmptyDefaultValue bool + DontSupportRenameColumn bool + DriverName string + SkipInitializeWithVersion bool + type Dialector struct + Version string + func (dialectopr Dialector) RollbackTo(tx *gorm.DB, name string) error + func (dialectopr Dialector) SavePoint(tx *gorm.DB, name string) error + func (dialector *Dialector) Create(db *gorm.DB) + func (dialector *Dialector) Initialize(db *gorm.DB) (err error) + func (dialector *Dialector) Update(db *gorm.DB) + func (dialector Dialector) BindVarTo(writer clause.Writer, stmt *gorm.Statement, v interface{}) + func (dialector Dialector) ClauseBuilders() map[string]clause.ClauseBuilder + func (dialector Dialector) DataTypeOf(field *schema.Field) string + func (dialector Dialector) DefaultValueOf(field *schema.Field) clause.Expression + func (dialector Dialector) Explain(sql string, vars ...interface{}) string + func (dialector Dialector) Migrator(db *gorm.DB) gorm.Migrator + func (dialector Dialector) Name() string + func (dialector Dialector) QuoteTo(writer clause.Writer, str string) + type Migrator struct + func (m Migrator) AddColumn(value interface{}, field string) error + func (m Migrator) AlterColumn(value interface{}, field string) 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) CreateIndex(value interface{}, name string) error + func (m Migrator) CreateTable(models ...interface{}) error + func (m Migrator) CurrentDatabase() (name string) + func (m Migrator) DropColumn(value interface{}, name string) error + func (m Migrator) DropIndex(value interface{}, name string) error + func (m Migrator) FullDataTypeOf(field *schema.Field) (expr clause.Expr) + func (m Migrator) GetTables() (tableList []string, err error) + func (m Migrator) HasColumn(value interface{}, field string) bool + func (m Migrator) HasIndex(value interface{}, name string) bool + func (m Migrator) HasTable(value interface{}) bool + func (m Migrator) RenameColumn(value interface{}, oldName, newName string) error + func (m Migrator) RenameIndex(value interface{}, oldName, newName string) error + type UpdateLocalTable struct + Prefix string + Suffix string + Table string + func (t UpdateLocalTable) Build(clause.Builder) + func (t UpdateLocalTable) ModifySQL(sql string) string + func (t UpdateLocalTable) ModifyStatement(stmt *gorm.Statement)