MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / show_table_schema

Function show_table_schema

scripts/view_db.py:27–33  ·  view source on GitHub ↗
(table_name)

Source from the content-addressed store, hash-verified

25
26
27def show_table_schema(table_name):
28 conn = connect()
29 cursor = conn.cursor()
30 cursor.execute(f"PRAGMA table_info({table_name})")
31 columns = cursor.fetchall()
32 conn.close()
33 return columns
34
35
36def show_table_data(table_name, limit=10):

Callers 1

mainFunction · 0.85

Calls 5

connectFunction · 0.85
cursorMethod · 0.80
executeMethod · 0.45
fetchallMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected