lua-resty-moongoo icon indicating copy to clipboard operation
lua-resty-moongoo copied to clipboard

col:del("test-a1",{"$and" = [{"version" = {"$gt" = old_time}},{"version" = {"$lt" = new_time}}]})

Open jicvi opened this issue 4 years ago • 2 comments

Excuse me! How to achieve

local query = {"$and" = [{"version" = {"$gt" = old_time}},{"version" = {"$lt" = new_time}}]} col:del(query) or col:find(query)

jicvi avatar Jun 28 '20 07:06 jicvi

Something like this should work

local query = {
  ["$and"] = {
    { version = { ["$gt"] = old_time } },
    { version = { ["$lt"] = new_time } }
  }
}
col:del("test-a1", query)

isage avatar Jun 28 '20 07:06 isage

Thank you!

jicvi avatar Jun 28 '20 07:06 jicvi