Open
Description
Bug Report
Current Behavior
Specifying the use
command followed by a space, the database name, and a semicolon, does not properly select the database. For example:
use dbname;
will produce switched to db dbname;
in the Playground Result
tab, but a subsequent find db.colname.find({});
on a collection colname
containing documents will produce no results.
However, if instead the command is issued as use('dbname');
the subsequent find
command does return results.
Expected Behavior/Code
I would expect the use dbname;
, followed by a valid find
, to return documents in the specified collection. This syntax appears valid according to both mongo and mongosh shell documentation:
https://docs.mongodb.com/manual/reference/mongo-shell/
https://docs.mongodb.com/mongodb-shell/run-commands/
Environment
- MongoDB for VS Code v0.6.12
- OS: macOS Big Sur 11.6