Skip to content
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

[FEATURE] Support pagination #14

Open
Yury-Fridlyand opened this issue Mar 17, 2023 · 2 comments
Open

[FEATURE] Support pagination #14

Yury-Fridlyand opened this issue Mar 17, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@Yury-Fridlyand
Copy link
Collaborator

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.

@Yury-Fridlyand Yury-Fridlyand added enhancement New feature or request untriaged labels Mar 17, 2023
@Nurlanprog
Copy link

Is this issue still active?

@Yury-Fridlyand
Copy link
Collaborator Author

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants