Documentation
¶
Overview ¶
Package transaction provides atomic transaction support for DynamORM
Index ¶
- type Transaction
- func (tx *Transaction) Commit() error
- func (tx *Transaction) Create(model any) error
- func (tx *Transaction) Delete(model any) error
- func (tx *Transaction) Get(model any, dest any) error
- func (tx *Transaction) Rollback() error
- func (tx *Transaction) Update(model any) error
- func (tx *Transaction) WithContext(ctx context.Context) *Transaction
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) 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
Click to show internal directories.
Click to hide internal directories.