janvi01 / sql-editor

A web-based application that provides a SQL editor to run queries and display results.
https://sql-editor-online.vercel.app/
MIT License
9 stars 17 forks source link

fixes #51: Display recently executed query at the top of the history #55

Closed aditya-armal closed 7 months ago

aditya-armal commented 8 months ago

Summary This pull request addresses the issue where the recently executed query is appended to the end of the query history instead of being displayed at the top. The fix ensures that the most recent query is now positioned at the top of the query history.

Changes Made Modified the logic for updating the query history to place the most recent query at the beginning of the array.

Related Issue Closes #51

vercel[bot] commented 8 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sql-editor ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 30, 2023 3:34pm
prash240303 commented 8 months ago

hey @aditya-armal the following PR looks good, but there is an issue that on running the previous Queries from the history, the output is not shown, and the output of previous query retains. if you can fix that.

steps to reproduce the error :

  1. select companyName from Customers
  2. select contactName from Suppliers
  3. select companyName from Customers the output of supplier is shown even when we run the query for customers.
prash240303 commented 7 months ago

Hi there, @aditya-Armal The following changes have not been implemented, so I am closing this PR.