MCPcopy Index your code
hub / github.com/unclecode/crawl4ai / aalter_db_add_column

Method aalter_db_add_column

crawl4ai/async_database.py:49–56  ·  view source on GitHub ↗
(self, new_column: str)

Source from the content-addressed store, hash-verified

47 await self.aalter_db_add_column(column)
48
49 async def aalter_db_add_column(self, new_column: str):
50 try:
51 async with aiosqlite.connect(self.db_path) as db:
52 await db.execute(f'ALTER TABLE crawled_data ADD COLUMN {new_column} TEXT DEFAULT ""')
53 await db.commit()
54 print(f"Added column '{new_column}' to the database.")
55 except Exception as e:
56 print(f"Error altering database to add {new_column} column: {e}")
57
58 async def aget_cached_url(self, url: str) -> Optional[Tuple[str, str, str, str, str, str, str, bool, str]]:
59 try:

Callers 1

update_db_schemaMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected