MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / _column_exists

Method _column_exists

src/core/database.py:63–70  ·  view source on GitHub ↗

Check if a column exists in a table

(self, db, table_name: str, column_name: str)

Source from the content-addressed store, hash-verified

61 return result is not None
62
63 async def _column_exists(self, db, table_name: str, column_name: str) -> bool:
64 """Check if a column exists in a table"""
65 try:
66 cursor = await db.execute(f"PRAGMA table_info({table_name})")
67 columns = await cursor.fetchall()
68 return any(col[1] == column_name for col in columns)
69 except:
70 return False
71
72 async def _ensure_config_rows(self, db, config_dict: dict = None):
73 """Ensure all config tables have their default rows

Callers 4

check_and_migrate_dbMethod · 0.95
_migrate_request_logsMethod · 0.95
get_logsMethod · 0.95
get_log_detailMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected