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

Method get_db_structure_by_jdbc

sql/SQLOperator.py:248–258  ·  view source on GitHub ↗

:param table_name: :param jdbc :return: 数据库结构信息

(self, jdbc, table_name)

Source from the content-addressed store, hash-verified

246 return None, None, None
247
248 def get_db_structure_by_jdbc(self, jdbc, table_name):
249 """
250 :param table_name:
251 :param jdbc
252 :return: 数据库结构信息
253 """
254 engine = self.connMap[jdbc]
255 metadata = MetaData()
256 metadata.bind = engine
257 table_obj = Table(table_name, metadata, autoload=True)
258 return table_obj.columns

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected