-
Notifications
You must be signed in to change notification settings - Fork 21
fix: Added advanced field option and offset support #814
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,24 @@ Response: `{ TotalCount, Records, HasNextPage, NextCursor?, CurrentPage?, TotalP | |
| - Use `HasNextPage` to check if more records exist | ||
| - Pass the `NextCursor` string value to `--cursor` to fetch the next page | ||
|
|
||
| ## Pagination | ||
|
|
||
| Offset-based under the hood. Available on both `records list` and `records query`: | ||
|
|
||
| - `-l, --limit <number>` — page size, default `50`, min `1`. Keep constant across a sweep (changing it re-slices the offset and can skip/duplicate records). | ||
| - `--cursor <NextCursor>` — opaque string from previous response. Pass verbatim; never hand-craft. | ||
| - `-o, --offset <number>` — non-negative record index. Rounded down to the nearest page boundary (`jumpToPage = floor(offset / limit) + 1`). **Mutually exclusive with `--cursor`** — passing both errors with *"--offset and --cursor are mutually exclusive"*. | ||
| - Stop when `HasNextPage: false`. `CurrentPage` / `TotalPages` are informational. | ||
|
|
||
| ```bash | ||
| # Sequential sweep | ||
| uip df records list <entity-id> --limit 100 --output json | ||
| uip df records list <entity-id> --limit 100 --cursor "<NextCursor>" --output json | ||
|
|
||
| # Jump directly to the page containing record #250 (with --limit 100 → page 3) | ||
| uip df records list <entity-id> --limit 100 --offset 250 --output json | ||
| ``` | ||
|
|
||
| ## Filtered Query | ||
|
|
||
| ```bash | ||
|
|
@@ -23,7 +41,7 @@ uip df records query <entity-id> \ | |
| --output json | ||
| ``` | ||
|
|
||
| Pagination for query also uses `--limit` and `--cursor` flags — not body keys. | ||
| Pagination for query also uses `--limit`, `--cursor`, and `--offset` flags — not body keys. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No this is supported in SDK for cursor based pagination. User can use limit based(Which is supported in datafabric API) or cursor based pagination (supported via sdk) |
||
|
|
||
| ```bash | ||
| # Query with pagination | ||
|
|
@@ -52,7 +70,7 @@ uip df records query <entity-id> \ | |
| } | ||
| ``` | ||
|
|
||
| > `start` and `limit` are **not** valid body keys — use `--limit` and `--cursor` CLI flags instead. | ||
| > Pagination is CLI-flag only: `--limit`, `--cursor`, `--offset`. Do not put `start`, `limit`, `offset`, or `pageSize` inside `--body` — the CLI translates these flags into the underlying offset-based API call. | ||
|
|
||
| ### Operators | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.