阅读背景:

我想使用NodeJS / Mongoose在MongoDB中用另一个集合替换一个集合,我应该使用renameCollection以及如何使用?

来源:互联网 

I have two collections with identical schema but different content. I would like to drop the first one and rename the second with the name of the first. I noticed that MongoDB has a function called renameCollection that would do the job perfectly, however I am struggling to find a way to implement it using Mongoose. Any solutions would be appreciated! I have two collections with identical schema bu




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: