I am missing something very fundamental to working within the shell.
The shell and server are 4.4.3. I don’t understand why I can declare a VAR for a DB and COLLECTION as one object and use it in a MQL. For example
MongoDB Enterprise PRIMARY> var col=db.product;
MongoDB Enterprise PRIMARY> col.find({}).count()
14027623
But I can’t define each component independently.
MongoDB Enterprise PRIMARY> var d=db
MongoDB Enterprise PRIMARY> var c=product
uncaught exception: ReferenceError: product is not defined :
Thanks
-Dave