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

Function trigger_log_error

backend/apps/chat/curd/chat.py:875–883  ·  view source on GitHub ↗
(session: SessionDep, log: ChatLog)

Source from the content-addressed store, hash-verified

873
874
875def trigger_log_error(session: SessionDep, log: ChatLog) -> ChatLog:
876 log.error = True
877 stmt = update(ChatLog).where(and_(ChatLog.id == log.id)).values(
878 error=True
879 )
880 session.execute(stmt)
881 session.commit()
882
883 return log
884
885
886def save_sql_answer(session: SessionDep, record_id: int, answer: str) -> ChatRecord:

Callers 1

check_sqlMethod · 0.90

Calls 2

updateFunction · 0.50
valuesMethod · 0.45

Tested by

no test coverage detected