Class: Cassandra::Result
- Inherits:
-
Object
- Object
- Cassandra::Result
- Includes:
- Enumerable
- Defined in:
- lib/cassandra/result.rb
Instance Method Summary collapse
-
#each {|row| ... } ⇒ Enumerator, self
(also: #rows, #each_row)
Returns Enumerator if no block given.
-
#empty? ⇒ Boolean
Whether it has any rows.
-
#execution_info ⇒ Cassandra::Execution::Info
Query execution information, such as number of retries and all tried hosts, etc.
-
#last_page? ⇒ Boolean
Whether no more pages are available.
-
#next_page(options = nil) ⇒ Cassandra::Result?
Loads next page synchronously.
-
#next_page_async(options = nil) ⇒ Cassandra::Future<Cassandra::Result>
Loads next page asynchronously.
-
#paging_state ⇒ String?
Exposes current paging state for stateless pagination.
-
#size ⇒ Integer
(also: #length)
Rows count.
Instance Method Details
#each {|row| ... } ⇒ Enumerator, self Also known as: rows, each_row
Returns Enumerator if no block given
50 51 |
# File 'lib/cassandra/result.rb', line 50 def each end |
#empty? ⇒ Boolean
40 41 |
# File 'lib/cassandra/result.rb', line 40 def empty? end |
#execution_info ⇒ Cassandra::Execution::Info
Query execution information, such as number of retries and all tried hosts, etc.
25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/cassandra/result.rb', line 25 def execution_info @info ||= Execution::Info.new(@payload, @warnings, @keyspace, @statement, , @hosts, @consistency, @retries, @trace_id ? Execution::Trace.new(@trace_id, @client, .load_balancing_policy) : nil) end |
#last_page? ⇒ Boolean
56 57 |
# File 'lib/cassandra/result.rb', line 56 def last_page? end |
#next_page(options = nil) ⇒ Cassandra::Result?
:paging_state
option will be ignored.
Loads next page synchronously
69 70 |
# File 'lib/cassandra/result.rb', line 69 def next_page( = nil) end |
#next_page_async(options = nil) ⇒ Cassandra::Future<Cassandra::Result>
:paging_state
option will be ignored.
Loads next page asynchronously
83 84 |
# File 'lib/cassandra/result.rb', line 83 def next_page_async( = nil) end |
#paging_state ⇒ String?
Although this feature exists to allow web applications to store paging state in an HTTP cookie, it is not safe to expose without encrypting or otherwise securing it. Paging state contains information internal to the Apache Cassandra cluster, such as partition key and data. Additionally, if a paging state is sent with CQL statement, different from the original, the behavior of Cassandra is undefined and will likely cause a server process of the coordinator of such request to abort.
Exposes current paging state for stateless pagination.
101 102 |
# File 'lib/cassandra/result.rb', line 101 def paging_state end |
#size ⇒ Integer Also known as: length
44 45 |
# File 'lib/cassandra/result.rb', line 44 def size end |