database

package
v1.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Extract

func Extract(ctx context.Context) (*gorm.DB, error)

Extract takes the gorm.DB database from the context. If the ctxDatabase wasn't used, an error is returned.

func ToContext

func ToContext(ctx context.Context, db *gorm.DB) context.Context

ToContext adds the gorm.DB database to the context for extraction later. Returning the new context that has been created.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL