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 进行操作

相关推荐
liulilittle1 天前
俄罗斯访问欧洲国际线路优化
开发语言·网络·信息与通信·ip·通信·俄罗斯·莫斯科
风象南1 天前
SpringBoot 实现网络限速
后端
陈小桔1 天前
logging模块-python
开发语言·python
消失的旧时光-19431 天前
函数指针 + 结构体 = C 语言的“对象模型”?——从 C 到 C++ / Java 的本质统一
linux·c语言·开发语言·c++·c
!停1 天前
C语言栈和队列的实现
开发语言·数据结构
源代码•宸1 天前
Golang语法进阶(定时器)
开发语言·经验分享·后端·算法·golang·timer·ticker
期待のcode1 天前
TransactionManager
java·开发语言·spring boot
郝学胜-神的一滴1 天前
Linux系统编程:深入理解读写锁的原理与应用
linux·服务器·开发语言·c++·程序人生
Larry_Yanan1 天前
Qt多进程(十一)Linux下socket通信
linux·开发语言·c++·qt
计算机学姐1 天前
基于SpringBoot的汽车租赁系统【个性化推荐算法+数据可视化统计】
java·vue.js·spring boot·后端·spring·汽车·推荐算法