Uploaded image for project: 'VS Code Extension'
  1. VS Code Extension
  2. VSCODE-566

Numeric collection names brake autocomplete

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      OS:
      node.js / npm versions:
      Additional info:

      Problem Statement/Rationale

      Numeric collection names are trying to be rewritten by a playground to an invalid form.

      Steps to Reproduce

      • Create a collection named `1` (the number)
      • Use some command that requires collection name, e.g. `db.getCollection('')`
      • Trigger autocomplete in the playground (Control+Space on Mac)

      Expected Results

      db.getCollection('1').insertMany([
        { 'item': 'abc', 'price': 10, 'quantity': 2, 'date': new Date('2014-03-01T08:00:00Z') },
      ]);
      

      Actual Results

      db.getCollection(['1']').insertMany([
      
        { 'item': 'abc', 'price': 10, 'quantity': 2, 'date': new Date('2014-03-01T08:00:00Z') },
      ]);
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            alena.khineika@mongodb.com Alena Khineika
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: