feat: support breaker with sql statements (#3936)

This commit is contained in:
Kevin Wan
2024-02-25 11:24:44 +08:00
committed by GitHub
parent 914bcdcf2b
commit 0dfaf135dd
8 changed files with 177 additions and 114 deletions

View File

@@ -4,6 +4,8 @@ import (
"context"
"database/sql"
"fmt"
"github.com/zeromicro/go-zero/core/breaker"
)
type (
@@ -75,6 +77,7 @@ func (t txSession) PrepareCtx(ctx context.Context, q string) (stmtSession StmtSe
return statement{
query: q,
stmt: stmt,
brk: breaker.NopBreaker(),
}, nil
}