-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does beego/orm support single-batch transactions? #5597
Labels
Comments
sorry, I don't know much about the RQLite. But if the RQLite already provide similar transaction like MySQL, beego/orm support it. |
This issue is inactive for a long time. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
bee version
)?go1.21.6, beegov2.1.6
go env
)?GO111MODULE='on'
GOARCH='amd64'
GOBIN=''
GOCACHE='/root/.cache/go-build'
GOENV='/root/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/root/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/root/go'
GOPRIVATE=''
GOPROXY='https://goproxy.cn'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.6'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1461063096=/tmp/go-build -gno-record-gcc-switches'
I am trying to manipulate RQLite through beego/orm. I
_ "github.com/rqlite/gorqlite/stdlib"
orm.RegisterDataBase("default", "rqlite", "http://127.0.0.1:4001/?charset=utf8")
and it works fine with simple CRUD operations.
However, RQLite supports transactions only in a single batch. One can group many statements into a single transaction, but one must submit them as a single unit. One cannot start a transaction, send some statements, come back later and submit some more, and then later commit.
I noticed that beego/orm supports 2 kinds of transactions, the first is:
and the second is through classic
Begin()
,Commit()
andRollback()
(which is not supported by RQLite).I wonder whether the single-batch transaction is supported and if supported, how to realize it through beego/orm?
The text was updated successfully, but these errors were encountered: