Documentation
¶
Index ¶
- Variables
- func BindGoFlags()
- func DefaultGormConfig() *gormDriver.Config
- func Delete(ctx dbContext.Context, model Table) error
- func InitDB(config api.Config) (*dbContext.Context, error)
- func NewDB(connection string) (*sql.DB, error)
- func NewGorm(connection string, config *gorm.Config) (*gorm.DB, error)
- func NewPgxPool(connection string) (*pgxpool.Pool, error)
- func Now() clause.Expr
- func SetupDB(connectionString string, logName string) (gormDB *gormDriver.DB, pgxPool *pgxpool.Pool, err error)
- type Table
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultQueryTimeout = 30 * time.Second
View Source
var LogLevel string
LogLevel is the log level for gorm logger
Functions ¶
func DefaultGormConfig ¶
func DefaultGormConfig() *gormDriver.Config
DefaultGormConfig returns the default GORM configuration
func InitDB ¶
InitDB creates a context with database connections Note: Does NOT check for migrations - consumers should verify migrations separately
func NewPgxPool ¶
NewPgxPool creates a new pgx connection pool with OpenTelemetry tracing
Types ¶
Click to show internal directories.
Click to hide internal directories.