MCPcopy Create free account
hub / github.com/caesarHQ/textSQL / explain_sql

Function explain_sql

api/app/api/routes.py:83–93  ·  view source on GitHub ↗

Explains SQL in natural language

()

Source from the content-addressed store, hash-verified

81
82@bp.route('/explain_sql', methods=['POST'])
83def explain_sql():
84 """
85 Explains SQL in natural language
86 """
87 request_body = request.get_json()
88 sql = request_body.get('sql')
89 if not sql:
90 error_msg = '`sql` is missing from request body'
91 return make_response(jsonify({"error": error_msg}), 400)
92 explanation = get_sql_explanation(sql)
93 return make_response(jsonify({'explanation': explanation}), 200)
94
95
96@bp.route('/text_to_sql', methods=['POST'])

Callers

nothing calls this directly

Calls 1

get_sql_explanationFunction · 0.50

Tested by

no test coverage detected