func (s *SQLStore) DriverName() string {
	return s.cfg.Driver
}
DriverName returns the name of the driver
package db
import (
	"context"
	"database/sql"
	"time"
)
type (
	Config struct {
		URI    string `json:"uri" yaml:"uri"`
		Driver string `json:"driver" yaml:"driver"`
	}
	SQLStore struct {
		db  *sql.DB
		cfg Config
	}
)
func NewStore(cfg Config) *SQLStore {
	return &SQLStore{db: nil, cfg: cfg}
}
func (s *SQLStore) Start(_ context.Context) error {
	if s.db != nil {
		return nil
	}
	db, err := sql.Open(s.cfg.Driver, s.cfg.URI)
	if err != nil {
		return err
	}
	db.SetMaxIdleConns(5)
	db.SetMaxOpenConns(10)
	db.SetConnMaxLifetime(time.Minute * 60)
	s.db = db
	return nil
}
func (s *SQLStore) Stop(_ context.Context) error {
	if s.db != nil {
		if err := s.db.Close(); err != nil {
			return err
		}
	}
	s.db = nil
	return nil
}
func (s *SQLStore) DB() *sql.DB {
	return s.db
}