Beispiel #1
0
 def _execute_sql_for_fetch(self, sql: str, cursor: jaydebeapi.Cursor):
     try:
         logging.debug(f"EXECUTING '{sql}'")
         cursor.execute(sql)
         logging.debug(f"SQL EXECUTED'")
     except Exception as e:
         logging.error(e)
Beispiel #2
0
 def last_generated_id(cursor: jaydebeapi.Cursor) -> int:
     cursor.execute("SELECT LAST_INSERT_ID()")
     return int(str(cursor.fetchone()[0]))
Beispiel #3
0
 def reset_generated_id(cursor: jaydebeapi.Cursor) -> None:
     cursor.execute('SELECT LAST_INSERT_ID(NULL)')