db

package
v0.69.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package db provides some assistant functions about the database.

Index

Constants

This section is empty.

Variables

View Source
var (
	// LogLevel is the level to log the sql statement and args.
	LogLevel = new(slog.LevelVar)

	// LogArgs is used to decide whether log args when logging the sql statement.
	LogArgs = new(atomic.Bool)
)
View Source
var Connection = gconf.StrOpt("connection", "The URL connection to the sql database, user:password@tcp(ip:port)/db.")

Connection is the configuration option to connect to the sql database.

Functions

func InitMysqlDB

func InitMysqlDB(connURL string, configs ...sqlx.Config) *sqlx.DB

InitMysqlDB initializes the mysql connection.

Types

This section is empty.

Jump to

Keyboard shortcuts

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