Documentation ¶
Index ¶
- func FromContext(ctx context.Context) *gorm.DB
- func Middleware(tx *gorm.DB) func(http.Handler) http.Handler
- func Open(opts ...optFuncs) (*gorm.DB, error)
- func Transaction[T any](ctx context.Context, fn func(*gorm.DB) (T, error), opts ...TransactionOptFunc) (T, error)
- func WithContext(ctx context.Context, tx *gorm.DB) context.Context
- func WithDebug(debug bool) optFuncs
- type TransactionOptFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Transaction ¶
Types ¶
type TransactionOptFunc ¶
type TransactionOptFunc func(*transactionOpts)
func WithNestedTransaction ¶
func WithNestedTransaction(tx *gorm.DB) TransactionOptFunc
Click to show internal directories.
Click to hide internal directories.