sqldb

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package sqldb provides utilities for establishing and managing SQL database connections.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDBConn

func NewDBConn(ctx context.Context, cfg *Config) (*sqlx.DB, error)

NewDBConn creates a new database connection with configured settings.

Types

type Config

type Config struct {
	DSN             string
	Driver          string
	MaxOpenConn     int
	MaxIdleConn     int
	ConnMaxLifetime time.Duration
	ConnMaxIdleTime time.Duration
}

Config holds the configuration parameters for database connection settings.

Jump to

Keyboard shortcuts

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