mirror of
https://gitee.com/dromara/mayfly-go
synced 2026-03-24 02:47:55 +08:00
refactor: 协程启动优化、tagviews调整
This commit is contained in:
@@ -37,11 +37,10 @@ func (sd *SqliteDialect) CopyTable(copy *dbi.DbCopyTable) error {
|
||||
|
||||
// 使用异步线程插入数据
|
||||
if copy.CopyData {
|
||||
go func() {
|
||||
defer gox.RecoverPanic()
|
||||
gox.Go(func() {
|
||||
// 执行插入语句
|
||||
_, _ = sd.dc.Exec(fmt.Sprintf("INSERT INTO \"%s\" SELECT * FROM \"%s\"", newTableName, tableName))
|
||||
}()
|
||||
})
|
||||
}
|
||||
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user