Description
Summary: Commenting in the query workbench causes the syntax highlighting to change, but a query with comments in it will cause an error.
Repro:
- Open Query Builder
- Enter a valid query and some comments. (example:
- – this is a comment
- SELECT * FROM `travel-sample` LIMIT 10;
- Click execute
Expected:
The comment to be ignored and the un-commented query to execute.
Actual:
Error message: syntax error
Notes:
In the 5.5 release, using "–" for commenting doesn't seem to affect the syntax highlighting anymore. Still, "–" or "#" is widely expected by SQL users to function as a comment, as I have observed giving a N1QL demo to 200-300 people at recent conferences.
Apparently "–" has never been supported by N1QL as a comment character, instead it uses "/" and "/".
The syntax highlighting incorrectly highlit "–" because it was originally copied from SQL, but that was fixed in Vulcan.
I can't comment on the larger question as to whether "–" should be supported as the beginning of a comment.