shishir-kuet opened a new pull request, #44:
URL: https://github.com/apache/asterixdb/pull/44

   This PR fixes an issue where selecting a different dataverse from the 
dropdown would overwrite the current query in the editor with a USE statement, 
causing loss of user input.
   
   With this change, the query editor now preserves the existing query text 
when the dataverse selection changes. Instead of replacing the query, the logic 
updates or prepends the appropriate USE statement only when necessary.
   
   🔧 Changes Made
   Updated the dataverseSelected() handler in the Angular dashboard.
   Preserved the existing query string instead of overwriting it.
   Replaced the leading USE statement if present, otherwise prepended it.
   Removed the USE statement when switching to Default or None.
   
   ✅ How to Test
   Open the AsterixDB dashboard (Angular UI).
   Enter a query in the editor (e.g., SELECT * FROM Metadata.Dataset;).
   Change the dataverse using the dropdown.
   Verify:
   The existing query is preserved.
   The USE <dataverse>; statement is correctly updated or inserted.
   Switching to Default removes any existing USE statement.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to