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

Implement the cursor API #2

Closed
Sammers21 opened this issue Aug 14, 2018 · 3 comments · Fixed by #29
Closed

Implement the cursor API #2

Sammers21 opened this issue Aug 14, 2018 · 3 comments · Fixed by #29
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Sammers21
Copy link
Contributor

We should have the ability to consume results with the cursor API as follows:

cassandraClient.cursor(statement, cursor -> {
    if(cursor.succeeded(){
       cursor.read(50 /* how many rows we'd like to read*/, rows ->{
           if(rows.succeeded()) {
               List<Row> list = rows.result; // here the list of rows is stored
           }
       });
    }
});
@Sammers21 Sammers21 added the enhancement New feature or request label Aug 14, 2018
@Sammers21 Sammers21 self-assigned this Aug 14, 2018
tsegismont pushed a commit that referenced this issue Oct 23, 2018
tsegismont added a commit that referenced this issue Oct 23, 2018
@tsegismont
Copy link
Contributor

@Sammers21 I like the idea, although I wouldn't create a new Cursor object, since we already have ResultSet which could be enhanced to get a specific number of rows. Do you think this could be contributed to 3.7 ?

@Sammers21
Copy link
Contributor Author

I wouldn't create a new Cursor object, since we already have ResultSet which could be enhanced to get a specific number of rows

I agree with this, the feature should be implemented in this way

@Sammers21
Copy link
Contributor Author

Do you think this could be contributed to 3.7

Yes, I think could be.

@Sammers21 Sammers21 added this to the 3.7.0 milestone Feb 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging a pull request may close this issue.

2 participants