Class: Dse::Graph::ResultSet
- Inherits:
-
Object
- Object
- Dse::Graph::ResultSet
- Extended by:
- Forwardable
- Includes:
- Enumerable
- Defined in:
- lib/dse/graph/result_set.rb
Overview
Collection of results of running a graph query. It wraps a Cassandra::Result. When iterating over results, individual results may be well-known domain objects or a generic Result.
Instance Method Summary collapse
-
#[](ind) ⇒ Object
Allow array indexing into the result-set.
-
#each {|result| ... } ⇒ Enumerator, self
Returns Enumerator if no block given.
-
#empty? ⇒ Boolean
Whether it has any result data.
-
#execution_info ⇒ Cassandra::Execution::Info
Query execution information, such as number of retries and all tried hosts, etc.
-
#size ⇒ Integer
(also: #length)
Number of results.
Instance Method Details
#[](ind) ⇒ Object
Allow array indexing into the result-set.
55 56 57 |
# File 'lib/dse/graph/result_set.rb', line 55 def [](ind) @parsed_results[ind] end |
#each {|result| ... } ⇒ Enumerator, self
Returns Enumerator if no block given
49 50 51 |
# File 'lib/dse/graph/result_set.rb', line 49 def each(&block) @parsed_results.each(&block) end |
#empty? ⇒ Boolean
Returns whether it has any result data.
36 |
# File 'lib/dse/graph/result_set.rb', line 36 def_delegators :@results, :execution_info, :empty?, :size |
#execution_info ⇒ Cassandra::Execution::Info
Query execution information, such as number of retries and all tried hosts, etc.
36 |
# File 'lib/dse/graph/result_set.rb', line 36 def_delegators :@results, :execution_info, :empty?, :size |
#size ⇒ Integer Also known as: length
Returns number of results.
36 |
# File 'lib/dse/graph/result_set.rb', line 36 def_delegators :@results, :execution_info, :empty?, :size |