CORDA-1344 Fix query paging in scheduled flow tests (#2970) (#3096)

* Fix paging tests, move out of scheduled flow tests and provide java example

* Fix a few issues with docs
This commit is contained in:
Katelyn Baker
2018-05-15 15:57:27 +01:00
committed by GitHub
parent 7a7599486b
commit d63ee71564
4 changed files with 89 additions and 33 deletions

View File

@ -259,13 +259,13 @@ Query for all states with pagination specification (10 results per page):
.. note:: The result set metadata field `totalStatesAvailable` allows you to further paginate accordingly as
demonstrated in the following example.
Query for all states using pagination specification and iterate using `totalStatesAvailable` field until no further
Query for all states using a pagination specification and iterate using the `totalStatesAvailable` field until no further
pages available:
.. literalinclude:: ../../node/src/test/kotlin/net/corda/node/services/events/ScheduledFlowTests.kt
.. literalinclude:: ../../node/src/test/kotlin/net/corda/node/services/vault/VaultQueryTests.kt
:language: kotlin
:start-after: DOCSTART VaultQueryExamplePaging
:end-before: DOCEND VaultQueryExamplePaging
:start-after: DOCSTART VaultQueryExample24
:end-before: DOCEND VaultQueryExample24
:dedent: 8
**LinearState and DealState queries using** ``LinearStateQueryCriteria``:
@ -426,6 +426,14 @@ Query for consumed deal states or linear ids, specify a paging specification and
:end-before: DOCEND VaultJavaQueryExample2
:dedent: 12
Query for all states using a pagination specification and iterate using the `totalStatesAvailable` field until no further pages available:
.. literalinclude:: ../../node/src/test/java/net/corda/node/services/vault/VaultQueryJavaTests.java
:language: java
:start-after: DOCSTART VaultQueryExample24
:end-before: DOCEND VaultQueryExample24
:dedent: 8
**Aggregate Function queries using** ``VaultCustomQueryCriteria``:
Aggregations on cash using various functions:
@ -465,8 +473,8 @@ identifier):
.. literalinclude:: ../../node/src/test/java/net/corda/node/services/vault/VaultQueryJavaTests.java
:language: java
:start-after: DOCSTART VaultJavaQueryExample4
:end-before: DOCEND VaultJavaQueryExample4
:start-after: DOCSTART VaultJavaQueryExample5
:end-before: DOCEND VaultJavaQueryExample5
:dedent: 12
Troubleshooting