go操作doris踩坑记录

go 操作 doris 踩坑记录

1.doris 无法用 delete from 删除整个表数据
2.doris 本身事务只支持 insert、rollback、commit

Error 1105 (HY000) : TException,msg: org.apache.thrift.TException: This is in a transaction, only insert, commit, rollback is acceptable

go 复制代码
最坑的是下面这段,不会报错,但是事务也不会生效
db, err := sql.Open("mysql", datasource)
tx, err1 := db.Begin()
具体逻辑...
err1 = tx.Rollback()
err1 = tx.Commit()

3.beego orm无法操作 doris

报错信息 panic:Error 1054 (42S22) : errCode = 2, detailMessage = Unknown column 'UTC_TIMESTAMP' in 'table list'

换用 go 原生库 "database/sql" 对 doris 进行操作

相关推荐
benchmark_cc1 小时前
一次获取多只股票实时行情:QuantDash `quotes.get(symbols=[...])` 批量快照
开发语言·python·数据分析·pandas·量化交易·股票数据·quantdash
geovindu1 小时前
python: PCA
开发语言·后端·python·算法
__万波__2 小时前
嵌入式存储技术--1.Flash物理存储
java·开发语言
Chen_harmony2 小时前
十六、ALV树
开发语言·c++
qq_274475153 小时前
第 28 篇:Promise 全解析:状态、then/catch/finally、静态方法 all/race/allSettled/any
开发语言·javascript
西西弗Sisyphus3 小时前
C++ 最小 Agentic Loop 实现 - 回调函数系列 - 初识回调(5)
开发语言·c++
程序员小杰@3 小时前
Java 统一报文转换 + 签名验签完整介绍
java·开发语言
冰美式只要糖3 小时前
Prefill 长短请求混批,为什么 128 Token 也要等 2.58 秒?
后端
不甘平凡的小鸟3 小时前
vs code 打开spring boot项目
java·spring boot·后端
忆想不到的晖3 小时前
删掉 1800 行编排代码后,我用 Agent-Native + 薄 AOP 重写了内容工作台
后端·node.js·agent