Workaround for resolving *sql.Tx
from Gorm *gorm.DB
:
err := gorm.DB.Transaction(func(tx *gorm.DB) error {
pool := tx.Statement.ConnPool
store.SaveTx(ctx, pool.(*sql.Tx), &outbox.Event{...})
})
The package includes a test suite that you can run with the go test
command:
go test ./...
Contributions to go-outbox
are welcome. Please submit a pull request or create an issue to discuss the changes you want to make.
go-outbox
is licensed under the MIT License. See the LICENSE
file for more information.