MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / show_count

Function show_count

scripts/view_db.py:45–51  ·  view source on GitHub ↗
(table_name)

Source from the content-addressed store, hash-verified

43
44
45def show_count(table_name):
46 conn = connect()
47 cursor = conn.cursor()
48 cursor.execute(f"SELECT COUNT(*) as cnt FROM {table_name}")
49 result = cursor.fetchone()
50 conn.close()
51 return result["cnt"] if result else 0
52
53
54def main():

Callers 1

mainFunction · 0.85

Calls 4

connectFunction · 0.85
cursorMethod · 0.80
executeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected