Minor improvement on ksql.go

new-query-chunks-api
Vinícius Garcia 2022-05-11 17:13:45 -03:00
parent 3701f0f325
commit 9792e11b16
1 changed files with 3 additions and 3 deletions

View File

@ -64,8 +64,8 @@ type Rows interface {
// Tx represents a transaction and is expected to be returned by the DBAdapter.BeginTx function // Tx represents a transaction and is expected to be returned by the DBAdapter.BeginTx function
type Tx interface { type Tx interface {
ExecContext(ctx context.Context, query string, args ...interface{}) (Result, error) DBAdapter
QueryContext(ctx context.Context, query string, args ...interface{}) (Rows, error)
Rollback(ctx context.Context) error Rollback(ctx context.Context) error
Commit(ctx context.Context) error Commit(ctx context.Context) error
} }
@ -887,7 +887,7 @@ func (c DB) Transaction(ctx context.Context, fn func(Provider) error) error {
return tx.Commit(ctx) return tx.Commit(ctx)
default: default:
return fmt.Errorf("can't start transaction: The DBAdapter doesn't implement the TxBegginner interface") return fmt.Errorf("can't start transaction: The DBAdapter doesn't implement the TxBeginner interface")
} }
} }