Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-34525

Improve "syntax error" messages with per-command suggested options

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 6.5.0
    • UI
    • None

    Description

      I noticed that some query statement errors (i.e. incorrectly written) are well captured and the user is given guidance about what to do.  For instance, mistyping "num_replicas" in the WITH options produces an error that says "valid options are x,y,z"

       

      I think it would be very helpful if this sort of in-line error support could be extended to at least some if not all other commands where a specific syntax is required but the user may not immediately remember what it is.  Would certainly save me having to google each time what the syntax is for "ALTER INDEX" for example  . 

       

      I could see this being generally useful at the query engine level, but even if it were just handled within the query workbench would be very helpful.  The workbench already has auto-complete, but its contextual-ness could be greatly improved to feed the user the syntax for a given command.

       

      For example, if I type "ALTER INDEX" and forget what comes next:

      a) the workbench could auto-complete to tell me that I need to enter bucket_name.index_name and the subsequent WITH command for action, nodes, replicas, etc

      or

      b) if I type in whatever I think it might be and hit enter (ALTER INDEX 'index name' <enter>) then the query engine could report back a similar syntax error with "The correct syntax for ALTER INDEX is 'ALTER INDEX bucket_name.index_name WITH {...}'"

       

      cc/Eben Haber

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Pramada.Kolichala Pramada Kolichala
              perry Perry Krug
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty