MCPcopy
hub / github.com/tanelpoder/0xtools / check_tables_exist

Method check_tables_exist

xtop/core/materializer.py:189–201  ·  view source on GitHub ↗

Check which materialized tables exist

(self)

Source from the content-addressed store, hash-verified

187 self.is_materialized = False
188
189 def check_tables_exist(self) -> Dict[str, bool]:
190 """Check which materialized tables exist"""
191 result = {}
192
193 for source, table_name in self.TABLE_NAMES.items():
194 try:
195 # Try to query the table
196 self.conn.execute(f"SELECT 1 FROM {table_name} LIMIT 1")
197 result[source] = True
198 except:
199 result[source] = False
200
201 return result
202
203 def get_table_stats(self) -> Dict[str, Dict[str, int]]:
204 """Get row counts and sizes for materialized tables"""

Callers

nothing calls this directly

Calls 1

executeMethod · 0.45

Tested by

no test coverage detected