-
Notifications
You must be signed in to change notification settings - Fork 5
Add paging documentation and update paging links #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| # GOCDB Programmatic Interface - Optional Cursor Paging | ||
|
|
||
| ## Overview | ||
|
|
||
| Cursor paging allows clients to iterate through massive result-sets which are | ||
| split into one or more smaller pages. This allows result-sets to be processed | ||
| that would otherwise be too large or memory-expensive to process in a single | ||
| query. | ||
|
|
||
| Paging may not always be necessary, we suggest you first try to execute your | ||
| query without paging. If the query fails due to breaching of the execution | ||
| time or memory limit, then try adding `next_cursor=0`. | ||
|
|
||
| Most of the API methods now support optional `next_cursor` and `prev_cursor` | ||
| URL parameters. | ||
|
|
||
| For backward compatibility, pagination is disabled by default and will only be | ||
| enabled when passing one of the new cursor query parameters. | ||
|
|
||
| If neither the `next_cursor` or `prev_cursor` URL parameters are specified, the | ||
| method behaves as before by fetching/rendering the requested result-set in one | ||
| query, and will not add the `meta` element as detailed below. | ||
|
|
||
| A non-paged query can therefore fail/timeout if either the execution time or | ||
| memory limits are exceeded (e.g. if you make a request for every downtime | ||
| without narrowing the search with extra filter parameters). | ||
|
|
||
| Paged XML results contain the `meta` element, which contains links to the | ||
| current/self, next, previous and first page of results. | ||
|
|
||
| When using paging, you need to move forward through the results by reading the | ||
| next links until the `count` element hits zero which indicates no more | ||
| results are available at that particular moment in time. | ||
|
|
||
| To start at the beginning of a result-set, specify `next_cursor=0`. | ||
|
|
||
| The max page size has been initially set to 100 but this is subject to change/ | ||
| refinement. NB: the max page size value is provided in the `max_page_size` | ||
| element. | ||
|
|
||
| The `count` element shows how many results are on the current page (note, if | ||
| this figure is less than `max_page_size` then you have come to the end of | ||
| the results, and at that moment in time, the next page will show no results | ||
| with a count of zero). | ||
|
|
||
| ## Summary | ||
|
|
||
| ### Paging parameters explained | ||
|
|
||
| | parameter | definition | | ||
| | - | - | | ||
| | `next_cursor` | A cursor that points to the start of the next page of results. | | ||
| | `prev_cursor` | A cursor that points to the start of the previous page of results. | | ||
|
|
||
| ### `meta` tags explained | ||
|
|
||
| | tag | definition | | ||
| | - | - | | ||
| | `self` | The link to the current page of results. | | ||
| | `next` | The link to the start of the next page of results. | | ||
| | `previous` | The link to the start of the previous page of results. | | ||
| | `start` | The link to the start of the first page of results. | | ||
| | `count` | Shows how many results are on the current page (note, if this figure is less than `max_page_size` then you have come to the end of the results, and at that moment in time, the next page will show no results with a count of zero). | | ||
| | `max_page_size` | The maximum number of results shown on a page. | | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.