import os
import oracledb
from dotenv import load_dotenv

load_dotenv()

def get_connection():
    return oracledb.connect(
        user=os.getenv("ORA_USER"),
        password=os.getenv("ORA_PASSWORD"),
        dsn=f"{os.getenv('ORA_HOST')}:{os.getenv('ORA_PORT')}/{os.getenv('ORA_SERVICE')}",
    )

def get_connection_indb():
    return oracledb.connect(
        user=os.getenv("ORA_USER_INDB"),
        password=os.getenv("ORA_PASSWORD_INDB"),
        dsn=f"{os.getenv('ORA_HOST')}:{os.getenv('ORA_PORT')}/{os.getenv('ORA_SERVICE')}",
    )
