From 9792e11b164275d64684f8eaa643cbcc60c54646 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Garcia?= Date: Wed, 11 May 2022 17:13:45 -0300 Subject: [PATCH] Minor improvement on ksql.go --- ksql.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ksql.go b/ksql.go index a840946..559d922 100644 --- a/ksql.go +++ b/ksql.go @@ -64,8 +64,8 @@ type Rows interface { // Tx represents a transaction and is expected to be returned by the DBAdapter.BeginTx function type Tx interface { - ExecContext(ctx context.Context, query string, args ...interface{}) (Result, error) - QueryContext(ctx context.Context, query string, args ...interface{}) (Rows, error) + DBAdapter + Rollback(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) 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") } }