func CreateDBSession(kubectlConfig kubernetes.Interface, namespace string, persistConfig *config.PersistConfig) (sqlbuilder.Database, string, error) {
	if persistConfig == nil {
		return nil, "", errors.InternalError("Persistence config is not found")
	}

	log.Info("Creating DB session")

	if persistConfig.PostgreSQL != nil {
		return CreatePostGresDBSession(kubectlConfig, namespace, persistConfig.PostgreSQL, persistConfig.ConnectionPool)
	} else if persistConfig.MySQL != nil {
		return CreateMySQLDBSession(kubectlConfig, namespace, persistConfig.MySQL, persistConfig.ConnectionPool)
	}
	return nil, "", fmt.Errorf("no databases are configured")
}
// CreateDBSession creates the dB session
CreateDBSession creates the dB session
// CreateDBSession creates the dB session
func CreateDBSession(kubectlConfig kubernetes.Interface, namespace string, persistConfig *config.PersistConfig) (sqlbuilder.Database, string, error) {
	if persistConfig == nil {
		return nil, "", errors.InternalError("Persistence config is not found")
	}
	log.Info("Creating DB session")
	if persistConfig.PostgreSQL != nil {
		return CreatePostGresDBSession(kubectlConfig, namespace, persistConfig.PostgreSQL, persistConfig.ConnectionPool)
	} else if persistConfig.MySQL != nil {
		return CreateMySQLDBSession(kubectlConfig, namespace, persistConfig.MySQL, persistConfig.ConnectionPool)
	}
	return nil, "", fmt.Errorf("no databases are configured")
}
func CreateDBSession ( kubectlConfig kubernetes . Interface , namespace string , persistConfig * config . PersistConfig ) ( sqlbuilder . Database , string , error ) { if persistConfig == nil { return nil , " " , errors . InternalError ( " " ) } log . Info ( " " ) if persistConfig . PostgreSQL != nil { return CreatePostGresDBSession ( kubectlConfig , namespace , persistConfig . PostgreSQL , persistConfig . ConnectionPool ) } else if persistConfig . MySQL != nil { return CreateMySQLDBSession ( kubectlConfig , namespace , persistConfig . MySQL , persistConfig . ConnectionPool ) } return nil , " " , fmt . Errorf ( " " ) }
CreateDBSession creates the dB session
CreateDBSession creates the dB session