-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
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') }, ]);