Right now my container's timezone is different with MySQL's, and I need to run a query to just update the time field on MySQL to its timezone. Normally, I can run the query with "edited=NOW()", but with the Golang squirrel, it does not have a proper way to set this clause. I cannot change both my app and mysql container's timezone, and I just need to update the date in DB. Is there any way to do in Squirell properly?
2条回答 默认 最新
- duanniu4106 2019-01-02 22:56关注
Instead of
Set(column, "NOW()")
, you need to doSet(column, sq.Expr("NOW()"))
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥15 Windows Script Host 无法找到脚本文件"C:\ProgramData\Player800\Cotrl.vbs”
- ¥15 matlab自定义损失函数
- ¥15 35114 SVAC视频验签的问题
- ¥15 impedancepy
- ¥15 求往届大挑得奖作品(ppt…)
- ¥15 如何在vue.config.js中读取到public文件夹下window.APP_CONFIG.API_BASE_URL的值
- ¥50 浦育平台scratch图形化编程
- ¥20 求这个的原理图 只要原理图
- ¥15 vue2项目中,如何配置环境,可以在打完包之后修改请求的服务器地址
- ¥20 微信的店铺小程序如何修改背景图