(session: SessionDep, current_user: CurrentUser, chat_record_id: int)
| 239 | return {} |
| 240 | |
| 241 | def 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 | |
| 246 | def get_chart_data_ds(session: SessionDep,ds_id,sql): |
| 247 | json_result: Dict[str, Any] = {'status': 'success','data':[],'message':''} |
no test coverage detected