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

Function get_chart_data_with_user_live

backend/apps/chat/curd/chat.py:241–244  ·  view source on GitHub ↗
(session: SessionDep, current_user: CurrentUser, chat_record_id: int)

Source from the content-addressed store, hash-verified

239 return {}
240
241def get_chart_data_with_user_live(session: SessionDep, current_user: CurrentUser, chat_record_id: int):
242 stmt = select(ChatRecord.datasource,ChatRecord.sql).where(and_(ChatRecord.id == chat_record_id, ChatRecord.create_by == current_user.id))
243 row = session.execute(stmt).first()
244 return get_chart_data_ds(session,row.datasource, row.sql)
245
246def get_chart_data_ds(session: SessionDep,ds_id,sql):
247 json_result: Dict[str, Any] = {'status': 'success','data':[],'message':''}

Callers 1

innerFunction · 0.90

Calls 2

get_chart_data_dsFunction · 0.85
firstMethod · 0.45

Tested by

no test coverage detected