我在 Cassandra 中有一个 CQL3 表,如下所示:
CREATE TABLE table (
usr text,
box text,
uidseq map<bigint, text>,
PRIMARY KEY (usr, box)
)
我在 cqlsh 中进行查询,如下所示:
select uidseq from table WHERE usr = 'usr' AND box = 'box';
uidseq
------------------
{1: 'a', 2: 'a'}
看起来很棒,直到我通过 Helenus 包对 node.js 和 JSON.stringify 运行相同的查询,返回结果值并取回:
[0,2,0,8,0,0,0,0,0,0,0,1,0,1,97,0,8,0,0,0,0,0,0,0,2,0,1,97]
我测试了Helenus返回的值,它确实作为一个对象返回,所以我不确定我哪里出了问题?
最佳答案
似乎是 helenus 包 https://github.com/simplereach/helenus/issues/113 的一个错误.
关于javascript - Node.js Helenus 返回的 Cassandra map 集合看起来很奇怪,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18218670/