db

package
v0.0.0-...-a974e34 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFailedToOpenDBConnection = errors.New("failed to open db connection")
	ErrFailedToPingDB           = errors.New("failed to ping db")
	ErrEmptyDBConnString        = errors.New("empty db connection string")
	ErrUndefinedDBDriver        = errors.New("undefined db driver")
)

Predefined errors.

Functions

func InitDB

func InitDB(driver, dbConnString string, dbMaxOpenConns, dbMaxIdleConns int) (*sql.DB, error)

InitDB initializes a database connection using the specified driver, connection string, maximum open connections, and maximum idle connections. It returns a pointer to the sql.DB object and an error if any occurred during the initialization process.

Types

This section is empty.

Directories

Path Synopsis
libsql

Jump to

Keyboard shortcuts

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