transactions

package
v1.3.2-RC1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 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, mode schema.TxMode, db database.DB, sessionID string) (*transaction, error)

Types

type Transaction

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

Jump to

Keyboard shortcuts

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