0
將db設置爲某個任意值後,我無法在shell中執行任何操作。爲什麼變量'db'不是隻讀的?
它知道錯誤或預期的行爲嗎?
> use tutorial
switched to db tutorial
> db
tutorial
> db = 5
5
> db
5
> show dbs
Fri Mar 23 17:18:40 TypeError: db.getMongo is not a function shell/utils.js:1235
>
> use tutorial
Fri Mar 23 17:18:55 TypeError: db.getMongo is not a function shell/utils.js:1167
> db = 'tutorial'
tutorial
> show dbs
Fri Mar 23 17:19:38 TypeError: db.getMongo is not a function shell/utils.js:1235
患者:「當我這樣做時會感到疼痛」。醫生:「所以不要這樣做」 – 2012-03-23 18:35:53