class Cassandra::Result

Public Instance Methods

each() click to toggle source

@yieldparam row [Hash] current row @return [Enumerator, self] returns Enumerator if no block given

   # File lib/cassandra/result.rb
50 def each
51 end
Also aliased as: rows, each_row
each_row()
Alias for: each
empty?() click to toggle source

@return [Boolean] whether it has any rows

   # File lib/cassandra/result.rb
40 def empty?
41 end
execution_info() click to toggle source

Query execution information, such as number of retries and all tried hosts, etc. @return [Cassandra::Execution::Info]

   # File lib/cassandra/result.rb
25 def execution_info
26   @info ||= Execution::Info.new(@payload,
27                                 @warnings,
28                                 @keyspace,
29                                 @statement,
30                                 @options,
31                                 @hosts,
32                                 @consistency,
33                                 @retries,
34                                 @trace_id ?
35                                     Execution::Trace.new(@trace_id, @client, @options.load_balancing_policy) :
36                                     nil)
37 end
last_page?() click to toggle source

@return [Boolean] whether no more pages are available

   # File lib/cassandra/result.rb
56 def last_page?
57 end
length()
Alias for: size
next_page(options = nil) click to toggle source

Loads next page synchronously

@param options [Hash] additional options, just like the ones for

{Cassandra::Session#execute}

@note `:paging_state` option will be ignored.

@return [Cassandra::Result, nil] returns `nil` if last page

@see Cassandra::Session#execute

   # File lib/cassandra/result.rb
69 def next_page(options = nil)
70 end
next_page_async(options = nil) click to toggle source

Loads next page asynchronously

@param options [Hash] additional options, just like the ones for

{Cassandra::Session#execute_async}

@note `:paging_state` option will be ignored.

@return [Cassandra::Future<Cassandra::Result>] a future that resolves to a new Result if there is a new page,

`nil` otherwise.

@see Cassandra::Session#execute

   # File lib/cassandra/result.rb
83 def next_page_async(options = nil)
84 end
paging_state() click to toggle source

Exposes current paging state for stateless pagination.

@return [String, nil] current paging state as a `String` or `nil`.

@note Although this feature exists to allow web applications to store

paging state in an [HTTP cookie](http://en.wikipedia.org/wiki/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.

@see github.com/apache/cassandra/blob/cassandra-2.0.16/doc/native_protocol_v2.spec#L482-L487 Paging State

description in Cassandra Native Protocol v2 specification
    # File lib/cassandra/result.rb
101 def paging_state
102 end
rows()
Alias for: each
size() click to toggle source

@return [Integer] rows count

   # File lib/cassandra/result.rb
44 def size
45 end
Also aliased as: length