utils/alchemy_db_client.py [31:53]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    driver = {
        'mysql': 'pymysql',
        'oracle': 'cx_oracle',
        'sqlserver': 'pymssql',
        'hologres': 'psycopg2'
    }.get(db_type.lower(), '')

    encoded_username = quote_plus(username)
    encoded_password = quote_plus(password)
    
    # Handle Hologres type, use PostgreSQL connection method
    actual_db_type = db_type.lower()
    if actual_db_type == 'hologres':
        actual_db_type = 'postgresql'
    
    # Create database engine
    connection_url = f'{actual_db_type}+{driver}://{encoded_username}:{encoded_password}@{host}:{port}/{database}'
    
    # Add application_name parameter with version for PostgreSQL/Hologres
    if db_type.lower() == 'hologres' or db_type.lower() == 'postgresql':
        connection_url += f'?application_name=hologres_text2data_from_dify_v{APP_VERSION}'
    
    engine = create_engine(connection_url)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



utils/alchemy_db_client.py [264:286]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    driver = {
        'mysql': 'pymysql',
        'oracle': 'cx_oracle',
        'sqlserver': 'pymssql',
        'hologres': 'psycopg2'
    }.get(db_type.lower(), '')

    encoded_username = quote_plus(username)
    encoded_password = quote_plus(password)
    
    # Handle Hologres type, use PostgreSQL connection method
    actual_db_type = db_type.lower()
    if actual_db_type == 'hologres':
        actual_db_type = 'postgresql'
    
    # Create database engine
    connection_url = f'{actual_db_type}+{driver}://{encoded_username}:{encoded_password}@{host}:{port}/{database}'
    
    # Add application_name parameter with version for PostgreSQL/Hologres
    if db_type.lower() == 'hologres' or db_type.lower() == 'postgresql':
        connection_url += f'?application_name=hologres_text2data_from_dify_v{APP_VERSION}'
    
    engine = create_engine(connection_url)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



