lua-resty-moongoo
lua-resty-moongoo copied to clipboard
col:del("test-a1",{"$and" = [{"version" = {"$gt" = old_time}},{"version" = {"$lt" = new_time}}]})
Excuse me! How to achieve
local query = {"$and" = [{"version" = {"$gt" = old_time}},{"version" = {"$lt" = new_time}}]} col:del(query) or col:find(query)
Something like this should work
local query = {
["$and"] = {
{ version = { ["$gt"] = old_time } },
{ version = { ["$lt"] = new_time } }
}
}
col:del("test-a1", query)
Thank you!