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

Function main

scripts/view_db.py:54–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52
53
54def main():
55 print("=" * 60)
56 print(f"Database: {DB_PATH}")
57 print("=" * 60)
58
59 tables = show_tables()
60 print(f"\nTables ({len(tables)}): {', '.join(tables)}\n")
61
62 for table in tables:
63 print(f"─── {table} ───")
64
65 # Schema
66 columns = show_table_schema(table)
67 cols = [col["name"] for col in columns]
68 print(f" Columns: {', '.join(cols)}")
69
70 # Count
71 count = show_count(table)
72 print(f" Rows: {count}")
73
74 # Sample data
75 rows = show_table_data(table, limit=3)
76 if rows:
77 print(f" Sample ({len(rows)} rows):")
78 for row in rows:
79 print(f" {dict(row)}")
80 print()
81
82
83if __name__ == "__main__":

Callers 1

view_db.pyFile · 0.70

Calls 4

show_tablesFunction · 0.85
show_table_schemaFunction · 0.85
show_countFunction · 0.85
show_table_dataFunction · 0.85

Tested by

no test coverage detected