Make graph ResultSet more array-like

Description

A few tweaks to ResultSet:

  • inspect shows internal state, leading users to think they can access that data.

  • ResultSet.first should return the first "Result".

  • ResultSet[] should return the n'th result.

  • Try to support other array ops.

Environment

None

Pull Requests

None

Activity

Show:

Sandeep Tamhankar 
May 6, 2016 at 6:38 PM
(edited)

I'm moving this back to dev because we should update the docs to not talk about paging and remove next_page* methods until DSE supports it. I presume that DSE will not support paging until post-5.0.

DSE ticket to support pagination in graph: https://datastax.jira.com/browse/DSP-8845

Kishan Karunaratne 
May 4, 2016 at 2:27 AM

Since paging is currently not supported in DSE Graph (paging flag is currently ignored), indexing with [] will be accessing all Results from the server.

Sandeep Tamhankar 
April 18, 2016 at 10:34 PM

I updated the class and method documentation to stress that a ResultSet represents a page of results, so indexing with [] is within the current page.

Good find!

Alex Popescu 
April 18, 2016 at 8:23 PM

Exposing the ResultSet as an array might be tricky when pagination is involved and become a memory hog.

Fixed

Details

Assignee

Reporter

Labels

Components

Fix versions

Priority

Created April 15, 2016 at 12:44 AM
Updated June 15, 2016 at 11:32 PM
Resolved June 15, 2016 at 11:28 PM