isage / lua-resty-moongoo

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

update method run fail , mongoc-1.20 ,mongdb 5.0.4 #43

Open 3244194454 opened 2 years ago

3244194454 commented 2 years ago

When you execute this code, a new record will be inserted.


local mg, err = moongoo.new("mongodb://xxx")
local col = mg:db("testdb"):collection("mytest2") -- 选择db和表
col:update({  name = "Bobby" }, { age = 20 } ,{upset = true} )

mongoc: 1.20 mongdb 5.0.4