db

package
v0.0.0-...-8886d92 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectSQL

func ConnectSQL(c context.Context, dsn string, pool *config.MyPool) (*sql.DB, error)

ConnectSQL creates database pool for MySql

func ExecuteSQLWorker

func ExecuteSQLWorker(sql string, app *config.AppConfig, errChan chan error, wg *sync.WaitGroup)

ExecuteSQLWorker this function executes against DB and passing errors through error channel this is not really needed but, I am demonstrating the sql can be run parallel

func InitialiseDatabase

func InitialiseDatabase(app *config.AppConfig) error

func NewConn

func NewConn() (*config.Conn, error)

NewConn connects to the database and generates a connection pool Connection pooling parameters can be accessed using env variables if wanted to

Types

This section is empty.

Jump to

Keyboard shortcuts

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