Documentation ¶
Index ¶
- Constants
- Variables
- 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
- func (dialector Dialector) Translate(err error) error
- type ErrMessage
- type Index
- type Migrator
- func (m Migrator) AlterColumn(value interface{}, name 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) CreateConstraint(value interface{}, name string) error
- func (m Migrator) CreateIndex(value interface{}, name string) error
- func (m Migrator) CurrentDatabase() (name string)
- func (m Migrator) DropColumn(value interface{}, name 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) GetIndexes(value interface{}) ([]gorm.Index, error)
- func (m Migrator) GetTables() (tableList []string, err error)
- func (m Migrator) HasColumn(value interface{}, name 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) RenameIndex(value interface{}, oldName, newName string) error
- func (m *Migrator) RunWithoutForeignKey(fc func() error) error
Constants ¶
View Source
const DriverName = "sqlite3"
DriverName is the default driver name for SQLite.
Variables ¶
View Source
var (
ErrConstraintsNotImplemented = errors.New("constraints not implemented on sqlite, consider using DisableForeignKeyConstraintWhenMigrating, more details https://github.com/go-gorm/gorm/wiki/GORM-V2-Release-Note-Draft#all-new-migrator")
)
Functions ¶
Types ¶
type Dialector ¶
func (Dialector) ClauseBuilders ¶ added in v1.0.9
func (dialector Dialector) ClauseBuilders() map[string]clause.ClauseBuilder
func (Dialector) DefaultValueOf ¶ added in v1.0.5
func (dialector Dialector) DefaultValueOf(field *schema.Field) clause.Expression
func (Dialector) RollbackTo ¶ added in v1.0.4
type ErrMessage ¶ added in v1.5.1
type Migrator ¶
func (Migrator) AlterColumn ¶
func (Migrator) BuildIndexOptions ¶
func (m Migrator) BuildIndexOptions(opts []schema.IndexOption, stmt *gorm.Statement) (results []interface{})
func (Migrator) ColumnTypes ¶ added in v1.3.0
func (m Migrator) ColumnTypes(value interface{}) ([]gorm.ColumnType, error)
ColumnTypes return columnTypes []gorm.ColumnType and execErr error
func (Migrator) CreateConstraint ¶
func (Migrator) CreateIndex ¶
func (Migrator) CurrentDatabase ¶
func (Migrator) DropColumn ¶
func (Migrator) DropConstraint ¶
func (Migrator) GetIndexes ¶ added in v1.5.5
GetIndexes return Indexes []gorm.Index and execErr error, See the doc
func (Migrator) HasConstraint ¶ added in v1.0.7
func (Migrator) RenameIndex ¶
func (*Migrator) RunWithoutForeignKey ¶ added in v1.0.6
Click to show internal directories.
Click to hide internal directories.