group db tx

This commit is contained in:
withchao
2023-02-20 17:43:09 +08:00
parent 6ef8228064
commit 762c49625c
16 changed files with 250 additions and 538 deletions
+11
View File
@@ -0,0 +1,11 @@
package tx
import "context"
type Tx interface {
Transaction(fn func(tx any) error) error
}
type CtxTx interface {
Transaction(ctx context.Context, fn func(ctx context.Context) error) error
}