transaction

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package transaction provides transaction management for sqlcredo operations. It implements the Transaction interface, wrapping CRUD and pagination operations within database transactions with commit and rollback capabilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Wrapper

type Wrapper[T any, I comparable] struct {
	domain.SQLExecutor
	domain.CRUD[T, I]
	domain.PageResolver[T]
	// contains filtered or unexported fields
}

func NewTx

func NewTx[T any, I comparable](ctx context.Context,
	db *sqlx.DB, tableInfo table.Info, driver string, debugFunc domain.DebugFunc, opts *sql.TxOptions,
) (*Wrapper[T, I], error)

func (*Wrapper[T, I]) Commit

func (t *Wrapper[T, I]) Commit() error

func (*Wrapper[T, I]) Rollback

func (t *Wrapper[T, I]) Rollback() error

Jump to

Keyboard shortcuts

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