Documentation ¶
Index ¶
- type Sqlize
- func (s Sqlize) ArvoSchema(needTables ...string) []string
- func (s Sqlize) Diff(old Sqlize)
- func (s *Sqlize) FromMigrationFolder() error
- func (s *Sqlize) FromObjects(objs ...interface{}) error
- func (s *Sqlize) FromString(sql string) error
- func (s Sqlize) HashValue() int64
- func (s Sqlize) StringDown() string
- func (s Sqlize) StringDownWithVersion(ver int64) string
- func (s Sqlize) StringUp() string
- func (s Sqlize) StringUpWithVersion(ver int64, dirty bool) string
- func (s Sqlize) WriteFiles(name string) error
- func (s Sqlize) WriteFilesVersion(name string, ver int64, dirty bool) error
- func (s Sqlize) WriteFilesWithVersion(name string, ver int64, dirty bool) error
- type SqlizeOption
- func WithCommentGenerate() SqlizeOption
- func WithMigrationFolder(path string) SqlizeOption
- func WithMigrationSuffix(upSuffix, downSuffix string) SqlizeOption
- func WithMigrationTable(table string) SqlizeOption
- func WithMysql() SqlizeOption
- func WithPluralTableName() SqlizeOption
- func WithPostgresql() SqlizeOption
- func WithSqlLowercase() SqlizeOption
- func WithSqlTag(sqlTag string) SqlizeOption
- func WithSqlUppercase() SqlizeOption
- func WithSqlite() SqlizeOption
- func WithSqlserver() SqlizeOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sqlize ¶
type Sqlize struct {
// contains filtered or unexported fields
}
Sqlize ...
func (Sqlize) ArvoSchema ¶
ArvoSchema export arvo schema, support mysql only
func (*Sqlize) FromMigrationFolder ¶
FromMigrationFolder load migration from folder `migrations`
func (*Sqlize) FromObjects ¶
FromObjects load from objects
func (*Sqlize) FromString ¶
FromString load migration from sql
func (Sqlize) StringDownWithVersion ¶
StringDownWithVersion migration down with version
func (Sqlize) StringUpWithVersion ¶
StringUpWithVersion migration up with version
func (Sqlize) WriteFiles ¶
WriteFiles create migration files
func (Sqlize) WriteFilesVersion ¶
WriteFilesVersion create migration version only
type SqlizeOption ¶
type SqlizeOption interface {
// contains filtered or unexported methods
}
SqlizeOption ...
func WithCommentGenerate ¶
func WithCommentGenerate() SqlizeOption
WithCommentGenerate default is off
func WithMigrationFolder ¶
func WithMigrationFolder(path string) SqlizeOption
WithMigrationFolder ...
func WithMigrationSuffix ¶
func WithMigrationSuffix(upSuffix, downSuffix string) SqlizeOption
WithMigrationSuffix ...
func WithMigrationTable ¶
func WithMigrationTable(table string) SqlizeOption
WithMigrationTable default is 'schema_migration'
Click to show internal directories.
Click to hide internal directories.