cloudwu / skynet

A lightweight online game framework
MIT License
13.28k stars 4.19k forks source link

mongo_collection:find的返回结果是userdata,无法序列号? #817

Closed linse073 closed 6 years ago

linse073 commented 6 years ago

调用mongo_collection:find方法,报错Unsupport type userdata to serialize。 而且selector现在不支持数组方式选择要返回的字段,报错Bson dictionary's key can't be number。

cloudwu commented 6 years ago

参考 test/testmongodb.lua 正确使用;还不明白的看源码实现。且你写的错误信息都是 bson 库抛出的,不是 mongo 库产生的,研究一下为什么不能被正确的 bson.encode 。