sql

package
v0.0.0-...-72205f7 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBConfig

type DBConfig struct {
	DSN             string
	MaxOpenConns    int
	ConnMaxLifetime time.Duration
	// ServiceName is a service name for trace
	ServiceName string
}

DBConfig db config

type DBFactory

type DBFactory struct {
	// contains filtered or unexported fields
}

DBConfig db config

func NewDBFactory

func NewDBFactory(cfg *DBConfig) *DBFactory

func (*DBFactory) CreateDB

func (f *DBFactory) CreateDB() (*sqlx.DB, error)

CreateDB creates db instance

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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