Hyperledger Composer query with LIMIT and SKIP ret

2019-08-21 08:39发布

问题:

Actually I want to list transactions with a limit, but the query return all the result on REST SERVER API , bellow my query

query list {
  description: "List  with limit and offset"
  statement:
      SELECT org.acme.biznet.things
          LIMIT _$limitParam
            SKIP _$skipParam
}

回答1:

Unfortunately, LIMIT/SKIP support is blocked by Fabric presently as described in Issue 1015 on GitHub.

https://github.com/hyperledger/composer/issues/1015



回答2:

As of Hyperledger Fabric v1.3, pagination of query results is supported. A more efficient approach than skip/limit is utilized. Please see the pagination documentation.