()
| 52 | |
| 53 | |
| 54 | def 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 | |
| 83 | if __name__ == "__main__": |
no test coverage detected