MCPcopy
hub / github.com/unclecode/crawl4ai / clear_db

Function clear_db

crawl4ai/database.py:96–105  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

94 return 0
95
96def clear_db():
97 check_db_path()
98 try:
99 conn = sqlite3.connect(DB_PATH)
100 cursor = conn.cursor()
101 cursor.execute('DELETE FROM crawled_data')
102 conn.commit()
103 conn.close()
104 except Exception as e:
105 print(f"Error clearing database: {e}")
106
107def flush_db():
108 check_db_path()

Callers

nothing calls this directly

Calls 2

check_db_pathFunction · 0.85
closeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…