开发者

Ruby MongoDB drop GridFS collection

How do I drop a Grid object with the Ruby Mongo Driver? I do drop from the shell, because it treats开发者_运维技巧 GridFS as collections, but how do I do it with Ruby?


Are you trying to remove a single file or the entire GridFS collections? the grid_file_system supports deleting by filename. Otherwise you can manually drop the collections (I think fs.files and fs.chunks by default)


Grids it's just to collections: files and chunks. So just drop these two collections.

I am not familiar with ruby but mb this link will be useful for you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜