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

Function flush_db

crawl4ai/database.py:107–116  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105 print(f"Error clearing database: {e}")
106
107def flush_db():
108 check_db_path()
109 try:
110 conn = sqlite3.connect(DB_PATH)
111 cursor = conn.cursor()
112 cursor.execute('DROP TABLE crawled_data')
113 conn.commit()
114 conn.close()
115 except Exception as e:
116 print(f"Error flushing database: {e}")
117
118def update_existing_records(new_column: str = "media", default_value: str = "{}"):
119 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…