Skip to content

[FEATURE] Support pagination #14

Description

@Yury-Fridlyand

Is your feature request related to a problem?
Pagination is not supported

What solution would you like?
Implementing some commands which will manage the paging process. Currently, cli tool interprets every input as a query and sends to OpenSearch. The goal is to add some commands which will be interpreted by the CLI tool.
Example of usage:

opensearchsql> select * from calcs;
fetched rows / total rows = 17/17
...

opensearchsql> set page_size = 10;
opensearchsql> select * from calcs;
Cursor stored as ###
fetched rows / total rows = 10/17
...

opensearchsql> cursor list;
1: created at <timestamp> on page N on query "select ...."
2: created at <timestamp> on page M on query "select ...."

opensearchsql> cursor fetch 1;
Cursor updated as 1
fetched rows / total rows = x/y
...
opensearchsql> cursor fetch 1;
No cursor received, cursor 1 deleted
fetched rows / total rows = z/y
...

What alternatives have you considered?
Return cursor to the user. Not convenient for the end user, because cursor string could be pretty big.

Do you have any additional context?
Probably, I'll do the fix on my own.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions