MCPcopy Create free account
hub / github.com/explorerhq/sql-explorer / table_schema

Function table_schema

explorer/assistant/utils.py:41–45  ·  view source on GitHub ↗
(db_connection, table_name)

Source from the content-addressed store, hash-verified

39
40
41def table_schema(db_connection, table_name):
42 schema = schema_info(db_connection)
43 s = [table for table in schema if table[0] == table_name]
44 if len(s):
45 return s[0][1]
46
47
48def sample_rows_from_table(connection, table_name):

Callers 2

build_promptFunction · 0.85

Calls 1

schema_infoFunction · 0.90

Tested by 1