Skip to content

Cursor count() returns 0 if called multiple times #379

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

Closed
rashtao opened this issue Mar 25, 2021 · 0 comments · Fixed by #382
Closed

Cursor count() returns 0 if called multiple times #379

rashtao opened this issue Mar 25, 2021 · 0 comments · Fixed by #382
Labels

Comments

@rashtao
Copy link
Collaborator

rashtao commented Mar 25, 2021

To reproduce:

        ArangoDB arangoDB = new ArangoDB.Builder().build();
        String query = "FOR i IN 1..3 RETURN { foo: i }";
        ArangoCursor<Object> cursor = arangoDB.db().query(query, Object.class);
        System.out.println("count: " + cursor.count());     // 3
        System.out.println("count: " + cursor.count());     // 0

As additional effect, after calling count() the cursor cannot be iterated anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant