Skip to content

Commit

Permalink
Pass resume point information to enable stable query paging
Browse files Browse the repository at this point in the history
  • Loading branch information
relyafi committed Sep 12, 2023
1 parent 17bb735 commit 6399a7b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
"name": "metadata",
"doc": "Metadata returned from the execution of the persistence operation",
"type": "net.corda.data.KeyValuePairList"
},
{
"name": "resumePoint",
"doc": "Used by queries that support stable paging to return opaque data that indicates where the next page should resume from",
"type": ["null", "bytes"],
"default": null
}
]
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "record",
"name": "FindWithNamedQuery",
"doc": "Find entities matched by a named query. Parameters for the query may be specified. Pagination is supported, but there's no guarantee of consistency if the underlying data changes. The data will not be sorted in Corda; if the database returns an unpredictable order that must be handled by the caller. FindWithNamedQuery can be used to enforce ordering if required. Replies with {@link EntityResponse}",
"doc": "Find entities matched by a named query. Parameters for the query may be specified. Pagination is supported, but there's no guarantee of consistency if the underlying data changes and using offset-based pagination. The data will not be sorted in Corda; if the database returns an unpredictable order that must be handled by the caller. FindWithNamedQuery can be used to enforce ordering if required. Replies with {@link EntityResponse}",
"namespace": "net.corda.data.persistence",
"fields": [
{
Expand All @@ -26,6 +26,12 @@
"name": "limit",
"type": "int",
"doc": "Limit number of rows in the output query results, after applying the offset. Use the maximum int value if you do not want a lower limit."
},
{
"name": "resumePoint",
"type": ["null", "bytes"],
"default": null,
"doc": "When a query supports stable paging, contains opaque data telling the query where to resume from when making queries for subsequent pages."
}
]
}

0 comments on commit 6399a7b

Please sign in to comment.