func poolOpen(pool *db.Connection, hints string) error {
	// Early exit if the connection is already open.
	if pool.Connection != nil {
		return nil
	}

	err := pool.Open()
	if err == nil {
		return nil
	}

	dsn := createLoggingDSN(pool.Config)
	sqlErrorMessage := getSQLErrorMessage(err)
	if sqlErrorMessage != nil {
		header := fmt.Sprintf(
			"Error from 'sql' package:\n  %s\nDatabase Engine:\n  %s",
			*sqlErrorMessage, pool.Config.EngineOrDefault(),
		)
		return formatKnownError(header, hints, dsn)
	}

	errString := fmt.Sprintf("%+v", err)
	header := fmt.Sprintf("Unexpected Open() failure:\n%s", indentTwo(errString))
	return formatUnknownError(header, hints, dsn)
}
// poolOpen calls `Open()` to verify the connection string is valid and
// that the selected `sql` driver can be used.
poolOpen calls `Open()` to verify the connection string is valid and
that the selected `sql` driver can be used.
// poolOpen calls ` Open () ` to verify the connection string is valid and // that the selected ` sql ` driver can be used .
func poolOpen(pool *db.Connection, hints string) error {
	if pool.Connection != nil {
		return nil
	}
	err := pool.Open()
	if err == nil {
		return nil
	}
	dsn := createLoggingDSN(pool.Config)
	sqlErrorMessage := getSQLErrorMessage(err)
	if sqlErrorMessage != nil {
		header := fmt.Sprintf(
			"Error from 'sql' package:\n  %s\nDatabase Engine:\n  %s",
			*sqlErrorMessage, pool.Config.EngineOrDefault(),
		)
		return formatKnownError(header, hints, dsn)
	}
	errString := fmt.Sprintf("%+v", err)
	header := fmt.Sprintf("Unexpected Open() failure:\n%s", indentTwo(errString))
	return formatUnknownError(header, hints, dsn)
}
func poolOpen ( pool * db . Connection , hints string ) error { if pool . Connection != nil { return nil } err := pool . Open ( ) if err == nil { return nil } dsn := createLoggingDSN ( pool . Config ) sqlErrorMessage := getSQLErrorMessage ( err ) if sqlErrorMessage != nil { header := fmt . Sprintf ( " \n \n \n " , * sqlErrorMessage , pool . Config . EngineOrDefault ( ) , ) return formatKnownError ( header , hints , dsn ) } errString := fmt . Sprintf ( " " , err ) header := fmt . Sprintf ( " \n " , indentTwo ( errString ) ) return formatUnknownError ( header , hints , dsn ) }
poolOpen calls `Open()` to verify the connection string is valid and
that the selected `sql` driver can be used.
poolOpen calls ` Open () ` to verify the connection string is valid and that the selected ` sql ` driver can be used .
// Early exit if the connection is already open.