#!/usr/bin/env python3
"""Auto-generated by AGI Loop cycle #1083
Task: Write a Python function that counts rows in every table in /Eden/DATA/asi_memory.db and prints results
Generated: 2026-02-12T19:42:19.646008
"""

import sqlite3

def count_rows_in_tables(db_path="/Eden/DATA/asi_memory.db"):
    conn = sqlite3.connect(db_path)
    cursor = conn.cursor()
    
    # Get list of tables
    cursor.execute("SELECT name FROM sqlite_master WHERE type='table';")
    tables = cursor.fetchall()
    
    # Count rows for each table
    results = {}
    for table in tables:
        table_name = table[0]
        cursor.execute(f"SELECT COUNT(*) FROM {table_name};")
        count = cursor.fetchone()[0]
        results[table_name] = count
    
    conn.close()
    
    # Print results
    for table, count in results.items():
        print(f"Table '{table}' has {count} rows.")

if __name__ == '__main__':
    count_rows_in_tables()