Documentation ¶
Index ¶
- func RegisterMysql()
- func RegisterSqlite()
- type Mysql
- func (p *Mysql) AddColumn(field string, o *orm.Options) error
- func (p *Mysql) AlterColumn(field string, o *orm.Options) error
- func (p *Mysql) AutoMigrate(sample interface{}, opts ...orm.Option) error
- func (p *Mysql) ColumnTypes(o *orm.Options) ([]orm.StructField, error)
- func (p *Mysql) CreateIndex(name string, o *orm.Options) error
- func (p *Mysql) CreateTable(o *orm.Options) (err error)
- func (p *Mysql) CurrentDatabase() (name string)
- func (p *Mysql) DropColumn(field string, o *orm.Options) error
- func (p *Mysql) DropIndex(name string, o *orm.Options) error
- func (p *Mysql) DropTable(o *orm.Options) error
- func (p Mysql) FullDataTypeOf(field *orm.StructField) string
- func (p *Mysql) GetTables() (tableList []string, err error)
- func (p *Mysql) HasColumn(field string, o *orm.Options) bool
- func (p *Mysql) HasIndex(name string, o *orm.Options) bool
- func (p *Mysql) HasTable(tableName string) bool
- func (p *Mysql) MigrateColumn(expect, actual *orm.StructField, o *orm.Options) error
- func (p *Mysql) ParseField(f *orm.StructField)
- type Sqlite
- func (p *Sqlite) AddColumn(field string, o *orm.Options) error
- func (p *Sqlite) AlterColumn(field string, o *orm.Options) error
- func (p *Sqlite) AutoMigrate(sample interface{}, opts ...orm.Option) error
- func (p *Sqlite) ColumnTypes(o *orm.Options) ([]orm.StructField, error)
- func (p *Sqlite) CreateIndex(name string, o *orm.Options) error
- func (p *Sqlite) CreateTable(o *orm.Options) (err error)
- func (p *Sqlite) CurrentDatabase() (name string)
- func (p *Sqlite) DropColumn(field string, o *orm.Options) error
- func (p *Sqlite) DropIndex(name string, o *orm.Options) error
- func (p *Sqlite) DropTable(o *orm.Options) error
- func (p *Sqlite) FullDataTypeOf(field *orm.StructField) string
- func (p *Sqlite) GetTables() (tableList []string, err error)
- func (p *Sqlite) HasColumn(name string, o *orm.Options) bool
- func (p *Sqlite) HasIndex(name string, o *orm.Options) bool
- func (p *Sqlite) HasTable(tableName string) bool
- func (p *Sqlite) MigrateColumn(expect, actual *orm.StructField, o *orm.Options) error
- func (p *Sqlite) ParseField(f *orm.StructField)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterMysql ¶
func RegisterMysql()
func RegisterSqlite ¶
func RegisterSqlite()
Types ¶
type Mysql ¶
Mysql m struct
func (*Mysql) AutoMigrate ¶
AutoMigrate
func (*Mysql) ColumnTypes ¶
ColumnTypes return columnTypes []gorm.ColumnType and execErr error
func (*Mysql) CurrentDatabase ¶
func (Mysql) FullDataTypeOf ¶
func (p Mysql) FullDataTypeOf(field *orm.StructField) string
func (*Mysql) MigrateColumn ¶
field: 1 - expect columntype: 2 - actual
func (*Mysql) ParseField ¶
func (p *Mysql) ParseField(f *orm.StructField)
type Sqlite ¶
Sqlite m struct
func (*Sqlite) AutoMigrate ¶
AutoMigrate
func (*Sqlite) ColumnTypes ¶
ColumnTypes return columnTypes []gorm.ColumnType and execErr error
func (*Sqlite) CurrentDatabase ¶
func (*Sqlite) FullDataTypeOf ¶
func (p *Sqlite) FullDataTypeOf(field *orm.StructField) string
func (*Sqlite) MigrateColumn ¶
field: 1 - expect columntype: 2 - actual
Click to show internal directories.
Click to hide internal directories.