Skip to content

删除成员后,遍历查询会报错 #8

Description

@lioisme
  • 先存储以下三个内容,
    data:set("each_key1", 1) data:set("each_key2", 2) data:set("each_key3", 3)

  • 再删除 each_key1
    data:del("each_key1") -- 删除成员

  • 再次遍历查询时会报错
    local db = require 'db' require 'db-query':bind(db) db.Exp:bind(_G) -- 查询键名包含「user_」的条目 local query = data:query() query:key(db.Exp.CONTAIN("each_key")) -- 过滤键名包含 "user_" -- 遍历查询结果 local results = query:map() for _, result in ipairs(results) do print(result.key, result.value) -- 输出键名和值 end

  • 以下是报错信息
    LS20250417165812.png

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions