gorm中使用子句构造器实现on duplicate key update的效果

参考文档

Gorm官方文档中创建Upsert的相关文档

自己实现的项目

https://gitee.com/huoyingwhw/kratos-gorm-transaction

// 使用gcnv包
go get github.com/gogf/gf

data层的代码截图

~~~

子句构造器详细说明

 

posted on 2023-03-27 16:47  江湖乄夜雨  阅读(188)  评论(0编辑  收藏  举报