开发者

Ruby MongoDB drop GridFS collection

开发者 https://www.devze.com 2023-03-01 23:43 出处:网络
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

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

精彩评论

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

关注公众号