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

Method get_tables_count

database/SQliteDB.py:111–120  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

109 return len(table)>0
110
111 def get_tables_count(self) -> Result:
112 result = Result(headers=['Table', "Rows"])
113 tables = self.get_tables()
114 for tbl in tables:
115 table_name = tbl[0]
116 rows = self._select(f"Select count(*) from {table_name}")
117 for row in rows:
118 result.rows.append([table_name, row[0]])
119
120 return result
121
122 def get_tables(self):
123 tables = self._select("Select name from sqlite_master where type='table'")

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected