You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
go get github.com/avito-tech/go-transaction-manager
33
+
go get github.com/avito-tech/go-transaction-manager/trm/v2
27
34
```
28
35
36
+
To install some support database use `go get github.com/avito-tech/go-transaction-manager/drivers/{name}`.
37
+
38
+
For example `go get github.com/avito-tech/go-transaction-manager/drivers/sqlx/v2`.
39
+
29
40
### Backwards Compatibility
30
41
31
42
The library is compatible with the most recent two versions of Go.
32
43
Compatibility beyond that is not guaranteed.
33
44
34
45
## Usage
35
46
36
-
**To use multiple transactions from different databases**, you need to set CtxKey in [Settings](trm/settings.go) by [WithCtxKey](trm/settings/option.go).
47
+
**To use multiple transactions from different databases**, you need to set CtxKey in [Settings](trm/settings.go)
48
+
by [WithCtxKey](trm/settings/option.go) ([docs](https://pkg.go.dev/github.com/avito-tech/go-transaction-manager/trm/v2)).
37
49
38
-
**For nested transactions with different transaction managers**, you need to use [ChainedMW](trm/manager/chain.go) ([docs](https://pkg.go.dev/github.com/avito-tech/go-transaction-manager/trm/manager)).
50
+
**For nested transactions with different transaction managers**, you need to use [ChainedMW](trm/manager/chain.go) ([docs](https://pkg.go.dev/github.com/avito-tech/go-transaction-manager/trm/v2/manager)).
39
51
40
-
**To skip a transaction rollback due to an error, use [ErrSkip](trm/manager.go#L20) or [Skippable](trm/manager.go#L24)**
52
+
**To skip a transaction rollback due to an error, use [ErrSkip](manager.go#L20) or [Skippable](manager.go#L24)**
41
53
42
-
### Explanation of the approach ([English](https://www.youtube.com/watch?v=aRsea6FFAyA), [Russian](https://habr.com/ru/companies/avito/articles/727168/))
54
+
### Explanation of the approach [English](https://www.youtube.com/watch?v=aRsea6FFAyA), Russian[article](https://habr.com/ru/companies/avito/articles/727168/) and [youtube](https://www.youtube.com/watch?v=fcdckM5sUxA).
43
55
44
56
### Examples with an ideal *repository* and nested transactions.
0 commit comments