Class: Cassandra::Result

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/cassandra/result.rb

Instance Method Summary collapse

Instance Method Details

#each {|row| ... } ⇒ Enumerator, self Also known as: rows, each_row

Returns Enumerator if no block given

Yield Parameters:

  • row (Hash)

    current row

Returns:

  • (Enumerator, self)

    returns Enumerator if no block given



50
51
# File 'lib/cassandra/result.rb', line 50

def each
end

#empty?Boolean

Returns whether it has any rows.

Returns:

  • (Boolean)

    whether it has any rows



40
41
# File 'lib/cassandra/result.rb', line 40

def empty?
end

#execution_infoCassandra::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,
                                @options,
                                @hosts,
                                @consistency,
                                @retries,
                                @trace_id ?
                                    Execution::Trace.new(@trace_id, @client, @options.load_balancing_policy) :
                                    nil)
end

#last_page?Boolean

Returns whether no more pages are available.

Returns:

  • (Boolean)

    whether no more pages are available



56
57
# File 'lib/cassandra/result.rb', line 56

def last_page?
end

#next_page(options = nil) ⇒ Cassandra::Result?

Note:

:paging_state option will be ignored.

Loads next page synchronously

Parameters:

  • options (Hash) (defaults to: nil)

    additional options, just like the ones for Session#execute

Returns:

See Also:



69
70
# File 'lib/cassandra/result.rb', line 69

def next_page(options = nil)
end

#next_page_async(options = nil) ⇒ Cassandra::Future<Cassandra::Result>

Note:

:paging_state option will be ignored.

Loads next page asynchronously

Parameters:

Returns:

See Also:



83
84
# File 'lib/cassandra/result.rb', line 83

def next_page_async(options = nil)
end

#paging_stateString?

Note:

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.

Returns:

  • (String, nil)

    current paging state as a String or nil.

See Also:



101
102
# File 'lib/cassandra/result.rb', line 101

def paging_state
end

#sizeInteger Also known as: length

Returns rows count.

Returns:

  • (Integer)

    rows count



44
45
# File 'lib/cassandra/result.rb', line 44

def size
end