thomaslevesque / CosmosDBStudio

A tool to browse and query Azure Cosmos DB databases
MIT License
54 stars 12 forks source link

Provide a default query on an empty query sheet #55

Closed ricardopinedathen closed 2 years ago

ricardopinedathen commented 2 years ago

This adds a default query when opening the query sheet. I've found myself writing this query time and time again just to see some data on a collection. Saving a few keystrokes today saves fingers for the keystrokes of tomorrow...🖐🙂🖐

thomaslevesque commented 2 years ago

Actually, I just thought of something: it'd be better to do this here: https://github.com/thomaslevesque/CosmosDBStudio/blob/194e80258fc119de4f72b5fcbd19bf8e3d069903/src/CosmosDBStudio.Model/QuerySheet.cs#L9

Otherwise, loading an existing empty query file will add the default text (not a major problem, but not ideal)

ricardopinedathen commented 2 years ago

All changes implemented! I tested opening and saving query sheets and they seem to be working fine. Opening an empty query sheet opens empty as expected. Please review.

thomaslevesque commented 2 years ago

All changes implemented! I tested opening and saving query sheets and they seem to be working fine. Opening an empty query sheet opens empty as expected. Please review.

Thanks @ricardopinedathen! If you can just cleanup the changes in QuerySheetViewModel (see my previous comment), I'll merge right away.

ricardopinedathen commented 2 years ago

All changes implemented! I tested opening and saving query sheets and they seem to be working fine. Opening an empty query sheet opens empty as expected. Please review.

Thanks @ricardopinedathen! If you can just cleanup the changes in QuerySheetViewModel (see my previous comment), I'll merge right away.

Done! Thanks!