microsoft / vscode-cosmosdb

Azure Databases extension for VS Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-cosmosdb
MIT License
155 stars 69 forks source link

NoSQL queries with comments fail to run #2414

Closed sevoku closed 2 days ago

sevoku commented 1 week ago

Enter any query with a commented out section as simple as:

/* SELECT TOP 10 * FROM c */

SELECT * FROM c

and run it.

Expected: the uncommented query gets executed.

Actual: query fails with:

Query failed Message: {"errors":[{"severity":"Error","location":{"start":0,"end":1},"code":"SC1001","message":"Syntax error, incorrect syntax near '/'."}]}

This works in Azure Data Explorer.

bk201- commented 2 days ago

@sevoku Are you sure that it works in Azure Data Explorer? If I'm not mistaken the comments in NoSQL are the same as in SQL -- (two hyphen before the line)

I've just run query there Image

sevoku commented 2 days ago

Thanks for double checking @bk201-. And I can confirm that -- comments work as expected in both Scrapbooks and the new Query Editor.