This commit is contained in:
Lizandro Guarnizo
2026-06-18 12:25:44 -05:00
parent 65ff7995e8
commit 408ea50d21
12 changed files with 1042 additions and 1100 deletions
+13 -1
View File
@@ -44,7 +44,7 @@ class FirebirdService:
return False, "No hay conexión activa", []
try:
cur = self.conn.cursor()
if params:
if params is not None:
cur.execute(query, params)
else:
cur.execute(query)
@@ -53,3 +53,15 @@ class FirebirdService:
return True, "", [dict(zip(columns, row)) for row in rows]
except Exception as e:
return False, str(e), []
def get_firebird_from_config(configs: dict) -> tuple:
fb = FirebirdService()
ok, msg = fb.connect(
configs.get("firebird_host", "localhost"),
int(configs.get("firebird_port", 3050)),
configs.get("firebird_database", ""),
configs.get("firebird_user", "SYSDBA"),
configs.get("firebird_password", "masterkey"),
)
return fb, ok, msg