国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

數(shù)據(jù)庫 - 為什么mongodb刪除文檔必須用ObjectId
伊謝爾倫
伊謝爾倫 2017-05-02 09:21:33
0
3
910


為什么根據(jù)id刪除文檔必須要用ObjectId這個方法呢?

伊謝爾倫
伊謝爾倫

小伙看你根骨奇佳,潛力無限,來學PHP伐。

reply all(3)
左手右手慢動作

Although what you see seems to be a string, the _id of document is actually an ObjectId object, so you must use the ObjectId() method to convert the string into an object before it can be used

洪濤

Add some basic knowledge.
mongo shell is built on JavaScript的基礎(chǔ)上的,不管是V8還是SpiderMonkey(兩者都曾經(jīng)作為mongo shell的引擎被使用過),都遵循EMCAScript并實現(xiàn)了它的一個子集。這就意味著shell里面的一切數(shù)據(jù)類型必須是ECMA標準中規(guī)定的數(shù)據(jù)類型。如果去查標準的話,JS的數(shù)據(jù)類型是非常有限的,基本上滿足不了一個數(shù)據(jù)庫的需要。所以有了BSON,支持那些JSON規(guī)范里沒有的數(shù)據(jù)類型。ObjectID就是其中之一。所以剩下的問題就是如何在JS的語法下表達一個它沒有的數(shù)據(jù)類型,結(jié)果就是你看到的ObjectID("...").

迷茫

Because _id is globally unique.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template