transactions

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTransactionNotFound = errors.New("no transaction found").WithCode(errors.CodInvalidParameterValue)

Functions

func NewTransaction

func NewTransaction(ctx context.Context, opts *sql.TxOptions, db database.DB, sessionID string) (*transaction, error)

Types

type Transaction

type Transaction interface {
	GetID() string
	IsClosed() bool
	Rollback() error
	Commit(ctx context.Context) ([]*sql.SQLTx, error)
	GetSessionID() string
	SQLExec(ctx context.Context, request *schema.SQLExecRequest) error
	SQLQuery(ctx context.Context, request *schema.SQLQueryRequest) (*schema.SQLQueryResult, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL