(self, sql: Optional[str], error: Optional[str], need_operate: Optional[bool] = False, only_sql: Optional[bool] = True, dbID: Optional[str] = None)
| 149 | return sql |
| 150 | |
| 151 | def SQL_ERROR_CHECK(self, sql: Optional[str], error: Optional[str], need_operate: Optional[bool] = False, only_sql: Optional[bool] = True, dbID: Optional[str] = None): |
| 152 | question = self.error_prompt_template.format(sql=sql, error=error, structure="") |
| 153 | |
| 154 | sql = self.llm.generate_response(input_text=question) |
| 155 | |
| 156 | if need_operate: |
| 157 | result = self.sqlHelper.operate(sql) |
| 158 | return sql, result |
| 159 | return sql |
| 160 | |
| 161 | def optimizeSQL(self, sql: Optional[str], only_sql: Optional[bool] = True, dbID: Optional[str] = None): |
| 162 | db_structure, db_index = self.SQL_operator.get_db_structure_and_index(sql) |
nothing calls this directly
no test coverage detected