couchdb hyperledger跳过/限制问题

时间:2018-04-03 21:11:36

标签: couchdb hyperledger-fabric

将node.js和CouchDb的Hyperledger Fabric SDK用作状态数据库

stub.getQueryResult(queryString)

其中queryString是字符串化的

queryString.selector = {};
queryString.selector.docType = docType;

if (!userId) {
    queryString.selector.userId = {'$gte': "0"};
} else {
    queryString.selector.userId = userId;
}

if (sortBy && sortOrder) {
    queryString.use_index = "_design/indexUserIdDoc";
    queryString.sort=[{}];
    queryString.sort[0][sortBy] = sortOrder;            
}

queryString.skip = 1;
queryString.limit = 1;

一切正常,但跳过限制被忽略; 此示例返回超过1行! 为什么呢?

0 个答案:

没有答案