Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory interface {
// NewTxn creates a new transaction object for database operations.
NewTxn(ctx context.Context) (Txn, error)
}
Factory represents a transaction factory object.
type Txn ¶
type Txn interface {
// Prepare prepares an SQL statement to be executed.
Prepare(query string) (*sql.Stmt, error)
// Commit commits the transaction.
Commit() error
// Rollback aborts the transaction.
Rollback() error
}
Txn represents a transaction interface that provides atomic SQL database and queue operations.
Click to show internal directories.
Click to hide internal directories.