MCPcopy Index your code
hub / github.com/dataease/SQLBot / get_chart_config

Function get_chart_config

backend/apps/chat/curd/chat.py:126–134  ·  view source on GitHub ↗
(session: SessionDep, chart_record_id: int)

Source from the content-addressed store, hash-verified

124
125
126def get_chart_config(session: SessionDep, chart_record_id: int):
127 stmt = select(ChatRecord.chart).where(and_(ChatRecord.id == chart_record_id))
128 res = session.execute(stmt)
129 for row in res:
130 try:
131 return orjson.loads(row.chart)
132 except Exception:
133 pass
134 return {}
135
136
137def _format_column(column: dict) -> str:

Callers 2

get_fields_from_chartMethod · 0.90
export_excelFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected