Browse Source

english docs updated

pull/27/head
yedf2 5 years ago
parent
commit
e3ff13ee93
  1. 2
      README.md
  2. 1
      dtmsvr/api_http.go

2
README.md

@ -5,7 +5,7 @@
[![Go Reference](https://pkg.go.dev/badge/github.com/yedf/dtm.svg)](https://pkg.go.dev/github.com/yedf/dtm) [![Go Reference](https://pkg.go.dev/badge/github.com/yedf/dtm.svg)](https://pkg.go.dev/github.com/yedf/dtm)
[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge-flat.svg)](https://github.com/avelino/awesome-go#database) [![Mentioned in Awesome Go](https://awesome.re/mentioned-badge-flat.svg)](https://github.com/avelino/awesome-go#database)
# [English Docs](https://github.com/yedf/dtm/blob/main/README-en.md) # [English Docs](https://en.dtm.pub)
# GO语言分布式事务管理服务 # GO语言分布式事务管理服务
DTM是首款golang的开源分布式事务管理器,优雅的解决了幂等、空补偿、悬挂等分布式事务难题。提供了简单易用、高性能、易水平扩展的分布式事务解决方案。 DTM是首款golang的开源分布式事务管理器,优雅的解决了幂等、空补偿、悬挂等分布式事务难题。提供了简单易用、高性能、易水平扩展的分布式事务解决方案。

1
dtmsvr/api_http.go

@ -65,6 +65,7 @@ func query(c *gin.Context) (interface{}, error) {
} }
trans := TransGlobal{} trans := TransGlobal{}
db := dbGet() db := dbGet()
db.Begin()
dbr := db.Must().Where("gid", gid).First(&trans) dbr := db.Must().Where("gid", gid).First(&trans)
if dbr.Error == gorm.ErrRecordNotFound { if dbr.Error == gorm.ErrRecordNotFound {
return M{"transaction": nil, "branches": [0]int{}}, nil return M{"transaction": nil, "branches": [0]int{}}, nil

Loading…
Cancel
Save