22 lines
521 B
Python
22 lines
521 B
Python
from lib.domain.BaseModel import database
|
|
|
|
|
|
class BTypeDAO:
|
|
__cur = None
|
|
|
|
def __init__(self):
|
|
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,))
|
|
data = self.__cur.fetchall()
|
|
return data
|
|
else:
|
|
return None
|
|
except mariadb.Error as e:
|
|
print(str(e))
|