MCPcopy Create free account
hub / github.com/CL-lau/SQL-GPT / __init__

Method __init__

front/DatabaseManagerGUI.py:74–76  ·  view source on GitHub ↗
(self, db_urls)

Source from the content-addressed store, hash-verified

72
73class DatabaseManager:
74 def __init__(self, db_urls):
75 self.engines = {db_name: create_engine(url) for db_name, url in db_urls.items()}
76 self.inspector = inspect(self.engines[next(iter(self.engines))]) # Use the first engine to inspect tables
77
78 def get_table_list(self, db_name):
79 self.inspector.bind = self.engines[db_name]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected