MCPcopy
hub / github.com/coleifer/sqlite-web / get_table_sql

Method get_table_sql

sqlite_web/sqlite_web.py:173–183  ·  view source on GitHub ↗
(self, table)

Source from the content-addressed store, hash-verified

171 return [TriggerMetadata(*row) for row in cursor.fetchall()]
172
173 def get_table_sql(self, table):
174 if not table:
175 return
176
177 cursor = self.query(
178 'SELECT sql FROM sqlite_master '
179 'WHERE tbl_name = ? AND type IN (?, ?)',
180 [table, 'table', 'view'])
181 res = cursor.fetchone()
182 if res is not None:
183 return res[0]
184
185 def get_view(self, name):
186 cursor = self.query(

Callers 4

_query_viewFunction · 0.80
table_structureFunction · 0.80
add_columnFunction · 0.80
table_contentFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected