isage / lua-resty-moongoo

MongoDB library for OpenResty
Do What The F*ck You Want To Public License
118 stars 33 forks source link

Fix the remove method of GridFS according the documents #29

Closed ufownl closed 5 years ago

ufownl commented 5 years ago

The document for this method is here.

isage commented 5 years ago

Hm. I think a proper way would be to check if passed id is indeed bson oid, or just a string and convert accordingly.

ufownl commented 5 years ago

Perhaps modifying the cbson.oid constructor so that it can construct an oid from another oid object is a better way. In addition, we can implement cbson.oid through a fixed-length buffer to avoid heap-alloc.

ufownl commented 5 years ago

I have submitted a PR to lua-cbson.