Documentation ¶
Index ¶
- func AutoMigrateTables(basicRes core.BasicRes, dst ...interface{}) errors.Error
- func ChangeColumnsType[D any](basicRes core.BasicRes, script core.MigrationScript, tableName string, ...) (err errors.Error)
- func CopyTableColumns[S any, D any](basicRes core.BasicRes, srcTableName string, dstTableName string, ...) (err errors.Error)
- func PrimarykeyIsAutoIncrement(db dal.Dal, tableName string) errors.Error
- func TransformColumns[S any, D any](basicRes core.BasicRes, script core.MigrationScript, tableName string, ...) (err errors.Error)
- func TransformTable[S any, D any](basicRes core.BasicRes, script core.MigrationScript, tableName string, ...) (err errors.Error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoMigrateTables ¶
AutoMigrateTables runs AutoMigrate for muliple tables
func ChangeColumnsType ¶
func ChangeColumnsType[D any]( basicRes core.BasicRes, script core.MigrationScript, tableName string, columns []string, update func(tmpColumnParams []interface{}) errors.Error, ) (err errors.Error)
ChangeColumnsType change the type of specified columns for the table
func CopyTableColumns ¶
func CopyTableColumns[S any, D any]( basicRes core.BasicRes, srcTableName string, dstTableName string, transform func(*S) (*D, errors.Error), ) (err errors.Error)
CopyTableColumns can copy data from src table to dst table
func PrimarykeyIsAutoIncrement ¶
PrimarykeyIsAutoIncrement check if the Primarykey is auto increment
func TransformColumns ¶
func TransformColumns[S any, D any]( basicRes core.BasicRes, script core.MigrationScript, tableName string, columns []string, transform func(src *S) (*D, errors.Error), ) (err errors.Error)
TransformColumns change the type of specified columns for the table and transform data one by one
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.