Documentation ¶
Index ¶
- Constants
- 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 (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) Initialize(db *gorm.DB) (err error)
- func (dialector Dialector) Migrator(db *gorm.DB) gorm.Migrator
- func (dialector Dialector) Name() string
- func (dialector Dialector) QuoteTo(writer clause.Writer, str string)
- func (dialectopr Dialector) RollbackTo(tx *gorm.DB, name string) error
- func (dialectopr Dialector) SavePoint(tx *gorm.DB, name string) error
- type Migrator
- func (m Migrator) AlterColumn(value interface{}, field string) error
- func (m Migrator) AutoMigrate(values ...interface{}) error
- func (m Migrator) ColumnTypes(value interface{}) ([]gorm.ColumnType, error)
- func (m Migrator) CreateConstraint(value interface{}, name string) error
- func (m Migrator) CreateIndex(value interface{}, name string) error
- func (m Migrator) CreateSchemaIfNotExists(schema string) error
- func (m Migrator) CreateTable(values ...interface{}) error
- func (m Migrator) CurrentDatabase() (name string)
- 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) FullDataTypeOf(field *schema.Field) (expr clause.Expr)
- func (m Migrator) GetTables() ([]string, error)
- func (m Migrator) GuessConstraintAndTable(stmt *gorm.Statement, name string) (_ *schema.Constraint, _ *schema.Check, table 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) 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
- type NamingStrategy
- func (sns NamingStrategy) CheckerName(table, column string) string
- func (sns NamingStrategy) ColumnName(table, column string) string
- func (sns NamingStrategy) IndexName(table, column string) string
- func (sns NamingStrategy) JoinTableName(joinTable string) string
- func (sns NamingStrategy) RelationshipFKName(rel schema.Relationship) string
- func (sns NamingStrategy) TableName(table string) string
Constants ¶
const (
SnowflakeDriverName = "snowflake"
)
Variables ¶
This section is empty.
Functions ¶
func MergeCreate ¶
Types ¶
type Dialector ¶
type Dialector struct {
*Config
}
func (Dialector) ClauseBuilders ¶
func (dialector Dialector) ClauseBuilders() map[string]clause.ClauseBuilder
func (Dialector) DefaultValueOf ¶
func (dialector Dialector) DefaultValueOf(field *schema.Field) clause.Expression
func (Dialector) RollbackTo ¶
type Migrator ¶
func (Migrator) AlterColumn ¶
AlterColumn no change
func (Migrator) AutoMigrate ¶
AutoMigrate remove index
func (Migrator) ColumnTypes ¶ added in v1.1.0
func (m Migrator) ColumnTypes(value interface{}) ([]gorm.ColumnType, error)
func (Migrator) CreateConstraint ¶
CreateConstraint no change
func (Migrator) CreateIndex ¶
CreateIndex return nil, SF does not support Index
func (Migrator) CreateSchemaIfNotExists ¶ added in v1.1.1
func (Migrator) CreateTable ¶
CreateTable modified - include CHANGE_TRACKING=true, for getting output back, may be removed once it can globally supported with table options - remove index (unsupported)
func (Migrator) CurrentDatabase ¶
CurrentDatabase SF flavor
func (Migrator) DropConstraint ¶
DropConstraint no change
func (Migrator) FullDataTypeOf ¶
FullDataTypeOf no change
func (Migrator) GuessConstraintAndTable ¶
func (m Migrator) GuessConstraintAndTable(stmt *gorm.Statement, name string) (_ *schema.Constraint, _ *schema.Check, table string)
GuessConstraintAndTable no change
func (Migrator) HasConstraint ¶
HasConstraint SF flavor
func (Migrator) HasTable ¶
HasTable modified for snowflake information_schema structure and convention (uppercased)
func (Migrator) RenameColumn ¶
RenameColumn not supported
func (Migrator) RenameIndex ¶
RenameIndex return nil, SF does not support Index
func (Migrator) RenameTable ¶
RenameTable no change
type NamingStrategy ¶
type NamingStrategy struct {
// contains filtered or unexported fields
}
NamingStrategy for snowflake (always uppercase)
func NewNamingStrategy ¶
func NewNamingStrategy() *NamingStrategy
NewNamingStrategy create new instance of snowflake naming strat
func (NamingStrategy) CheckerName ¶
func (sns NamingStrategy) CheckerName(table, column string) string
CheckerName snowflake edition
func (NamingStrategy) ColumnName ¶
func (sns NamingStrategy) ColumnName(table, column string) string
ColumnName snowflake edition
func (NamingStrategy) IndexName ¶
func (sns NamingStrategy) IndexName(table, column string) string
IndexName snowflake edition
func (NamingStrategy) JoinTableName ¶
func (sns NamingStrategy) JoinTableName(joinTable string) string
JoinTableName snowflake edition
func (NamingStrategy) RelationshipFKName ¶
func (sns NamingStrategy) RelationshipFKName(rel schema.Relationship) string
RelationshipFKName snowflake edition
func (NamingStrategy) TableName ¶
func (sns NamingStrategy) TableName(table string) string
TableName snowflake edition