MCPcopy Create free account
hub / github.com/daniel2005d/mapXplore / search_tables

Method search_tables

database/SQliteDB.py:129–139  ·  view source on GitHub ↗
(self, filter:str=None)

Source from the content-addressed store, hash-verified

127 raise ModuleNotFoundError("Databases not available on sqlite")
128
129 def search_tables(self, filter:str=None):
130 result = Result(headers=['tables'])
131 if filter:
132 tables = self._select(f"SELECT name FROM sqlite_master WHERE type='table' AND name like '%{filter}%'")
133 else:
134 tables = self.get_tables()
135 if tables:
136 for table in tables:
137 result.rows.append(table)
138
139 return result
140
141 def search_columns(self, filter:str) -> Result:
142 result = Result(headers=['table_name','column_name'])

Callers

nothing calls this directly

Calls 4

_selectMethod · 0.95
get_tablesMethod · 0.95
ResultClass · 0.90
appendMethod · 0.45

Tested by

no test coverage detected