(self, sql: Optional[str], only_sql: Optional[bool] = True, dbID: Optional[str] = None)
| 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) |
| 163 | question = self.optimize_prompt_template.format(sql=sql, structure=db_structure, index=db_index) |
| 164 | |
| 165 | sql = self.llm.generate_response(input_text=question) |
| 166 | return sql |
| 167 | |
| 168 | def processSQL(self, sql: Optional[str], dbID: Optional[str] = None): |
| 169 | if str(sql).__contains__('\n'): |
nothing calls this directly
no test coverage detected