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

Function transform_to_json_schema

explorer/schema.py:38–44  ·  view source on GitHub ↗
(schema_info)

Source from the content-addressed store, hash-verified

36
37
38def transform_to_json_schema(schema_info):
39 json_schema = {}
40 for table_name, columns in schema_info:
41 json_schema[table_name] = []
42 for column_name, _ in columns:
43 json_schema[table_name].append(column_name)
44 return json_schema
45
46
47def schema_json_info(db_connection):

Callers 2

schema_json_infoFunction · 0.85
build_schema_cache_asyncFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected