MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / delete_tool_data

Function delete_tool_data

web/pgadmin/settings/__init__.py:492–511  ·  view source on GitHub ↗
(trans_id=None)

Source from the content-addressed store, hash-verified

490
491
492def delete_tool_data(trans_id=None):
493 try:
494 if trans_id:
495 results = db.session \
496 .query(ApplicationState) \
497 .filter(ApplicationState.uid == current_user.id,
498 ApplicationState.id == trans_id) \
499 .all()
500 else:
501 results = db.session \
502 .query(ApplicationState) \
503 .filter(ApplicationState.uid == current_user.id) \
504 .all()
505 for result in results:
506 db.session.delete(result)
507 db.session.commit()
508 return True, 'Success'
509 except Exception as e:
510 db.session.rollback()
511 return False, str(e)
512
513
514def compute_md5_hash_file(file_path, chunk_size=8192):

Callers 2

saveFunction · 0.90
delete_application_stateFunction · 0.85

Calls 2

filterMethod · 0.80
deleteMethod · 0.45

Tested by

no test coverage detected