func NewSQLStorageFromConnection(conn connection.DB) *SQLStorage {
	return &SQLStorage{conn: conn}
}
NewSQLStorageFromConnection returns a new SQLStorage using the passed connection
package ticketing
import (
	"fmt"
	"log"
	"net"
	"time"
	"github.com/ShiftLeftSecurity/gaum/db/chain"
	"github.com/ShiftLeftSecurity/gaum/db/connection"
	"github.com/ShiftLeftSecurity/gaum/db/logging"
	"github.com/ShiftLeftSecurity/gaum/db/postgres"
	"github.com/gopheracademy/manager/def"
	"github.com/jackc/pgerrcode"
	"github.com/jackc/pgx"
	uuid "github.com/satori/go.uuid"
)
func NewSQLStorage(connectionString string, logger *log.Logger) (*SQLStorage, error) {
	logLevel := connection.Error
	connector := postgres.Connector{
		ConnectionString: connectionString,
	}
	maxConnLifetime := 1 * time.Minute
	db, err := connector.Open(&connection.Information{
		Logger:          logging.NewGoLogger(logger),
		LogLevel:        logLevel,
		ConnMaxLifetime: &maxConnLifetime,
		CustomDial: func(network, addr string) (net.Conn, error) {
			d := &net.Dialer{
				KeepAlive: time.Minute,
			}
			return d.Dial(network, addr)
		},
	})
	if err != nil {
		return nil, fmt.Errorf("initializing db connection: %w", err)
	}
	return &SQLStorage{conn: db}, nil
}