Use ORM for applicants

This commit is contained in:
Yuri Becker
2025-04-21 23:45:33 +02:00
parent 0ae153617b
commit 45f19d80d0
45 changed files with 388 additions and 354 deletions

View File

@@ -1,20 +1,20 @@
from .DbManager import DbManager
from lib.domain.BaseModel import database
class BTypeDAO:
__cur = None
def __init__(self):
#print(f"*** File: {__file__}, init()")
self.__con = DbManager().getConnection()
self.__con = database.connection()
if self.__con:
self.__cur = self.__con.cursor()
def getBType(self):
try:
if self.__cur:
self.__cur.callproc("getBtype", (None, None, ))
self.__cur.callproc("getBtype", (None, None,))
data = self.__cur.fetchall()
return(data)
return data
else:
return None
except mariadb.Error as e: