anumaurya114exp commited on
Commit
afd022c
·
1 Parent(s): 80ded9e

commenting out modification of wrong query

Browse files
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -101,14 +101,12 @@ def testSQL(sql):
101
  except Exception as e:
102
  errorMessage = {"function":"testSQL","error":str(e), "userInput":sql}
103
  saveLog(errorMessage, 'error')
104
-
105
  print(f"Error occured during running the query {sql}.\n and the error is {str(e)}")
106
-
107
- prompt = f"Please correct the following sql query, also it has to be run on {PLATFORM}. sql query is \n {sql}. the error occured is {str(e)}."
108
- modifiedSql = queryHelper.modifySqlQueryEnteredByUser(prompt)
109
- logMessage = {"function":"queryHelper.modifySqlQueryEnteredByUser", "sqlQuery":sql, "modifiedSQLQuery":modifiedSql}
110
- saveLog(logMessage, 'info')
111
- return f"The query you entered throws some error. Here is modified version. Please try this.\n {modifiedSql}"
112
 
113
 
114
  def onSelectedTablesChange(tablesSelected):
 
101
  except Exception as e:
102
  errorMessage = {"function":"testSQL","error":str(e), "userInput":sql}
103
  saveLog(errorMessage, 'error')
 
104
  print(f"Error occured during running the query {sql}.\n and the error is {str(e)}")
105
+ # prompt = f"Please correct the following sql query, also it has to be run on {PLATFORM}. sql query is \n {sql}. the error occured is {str(e)}."
106
+ # modifiedSql = queryHelper.modifySqlQueryEnteredByUser(prompt)
107
+ # logMessage = {"function":"queryHelper.modifySqlQueryEnteredByUser", "sqlQuery":sql, "modifiedSQLQuery":modifiedSql}
108
+ # saveLog(logMessage, 'info')
109
+ return f"The query you entered throws some error. Here is the error. Please try different query\n {str(e)}"
 
110
 
111
 
112
  def onSelectedTablesChange(tablesSelected):