transaction

package
v1.0.24 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package transaction provides atomic transaction support for DynamORM

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Transaction

type Transaction struct {
	// contains filtered or unexported fields
}

Transaction represents a DynamoDB transaction

func NewTransaction

func NewTransaction(session *session.Session, registry *model.Registry, converter *pkgTypes.Converter) *Transaction

NewTransaction creates a new transaction

func (*Transaction) Commit

func (tx *Transaction) Commit() error

Commit executes the transaction

func (*Transaction) Create

func (tx *Transaction) Create(model any) error

Create adds a create operation to the transaction

func (*Transaction) Delete

func (tx *Transaction) Delete(model any) error

Delete adds a delete operation to the transaction

func (*Transaction) Get

func (tx *Transaction) Get(model any, dest any) error

Get adds a get operation to the transaction

func (*Transaction) Rollback

func (tx *Transaction) Rollback() error

Rollback cancels the transaction (no-op for DynamoDB)

func (*Transaction) Update

func (tx *Transaction) Update(model any) error

Update adds an update operation to the transaction

func (*Transaction) WithContext

func (tx *Transaction) WithContext(ctx context.Context) *Transaction

WithContext sets the context for the transaction

Jump to

Keyboard shortcuts

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