summary report download code commit.

This commit is contained in:
2025-12-02 15:38:19 +05:30
parent d21daaa83f
commit 3cf258ba0d
8 changed files with 249 additions and 110 deletions

View File

@@ -7,22 +7,33 @@ class YearGet:
self.conn = DBConfig.get_db_connection()
self.cursor = self.conn.cursor(dictionary=True)
# get year fetch in perticular Model name.
def get_year_by_model(self, proc_name):
try:
self.cursor.callproc(proc_name)
years = []
for result in self.cursor.stored_results():
rows = result.fetchall()
years = [row["year"] for row in rows]
print("-- years get --",years)
return years
except mysql.connector.Error as e:
print("MySQL Error:", e)
return []
# def get_all_year_in_all_model(self):
# self.cursor.callproc("AllYearsInAllModel")
# years = []
# for result in self.cursor.stored_results():
# rows = result.fetchall()
# years = [row["year"] for row in rows]
# return years
def close(self):
self.cursor.close()
self.conn.close()