Documentation ¶
Overview ¶
Package dbcontext provides DB transaction support for transactions tha span method calls of multiple repositories and services.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB represents a DB connection that can be used to run SQL queries.
func (*DB) TransactionHandler ¶
TransactionHandler returns a middleware that starts a transaction. The transaction started is kept in the context and can be accessed via With().
func (*DB) Transactional ¶
Transactional starts a transaction and calls the given function with a context storing the transaction. The transaction associated with the context can be accesse via With().
Click to show internal directories.
Click to hide internal directories.