class Cassandra::Results::Void
Public Class Methods
new(payload, warnings, trace_id, keyspace, statement, options, hosts, consistency, retries, client, futures_factory)
click to toggle source
# File lib/cassandra/result.rb 193 def initialize(payload, 194 warnings, 195 trace_id, 196 keyspace, 197 statement, 198 options, 199 hosts, 200 consistency, 201 retries, 202 client, 203 futures_factory) 204 @payload = payload 205 @warnings = warnings 206 @trace_id = trace_id 207 @keyspace = keyspace 208 @statement = statement 209 @options = options 210 @hosts = hosts 211 @consistency = consistency 212 @retries = retries 213 @client = client 214 @futures = futures_factory 215 end
Public Instance Methods
each(&block)
click to toggle source
Iterates over each row in the result set.
@yieldparam row [Hash] each row in the result set as a hash @return [Cassandra::Result]
# File lib/cassandra/result.rb 232 def each(&block) 233 if block_given? 234 EMPTY_LIST.each(&block) 235 self 236 else 237 EMPTY_LIST.each 238 end 239 end
empty?()
click to toggle source
Returns whether or not there are any rows in this result set
# File lib/cassandra/result.rb 218 def empty? 219 true 220 end
inspect()
click to toggle source
# File lib/cassandra/result.rb 271 def inspect 272 "#<Cassandra::Result:0x#{object_id.to_s(16)} @rows=[] @last_page=true>" 273 end
last_page?()
click to toggle source
Returns true when there are no more pages to load.
This is only relevant when you have requested paging of the results with the `:page_size` option to {Cassandra::Session#execute}.
@see Cassandra::Session#execute
# File lib/cassandra/result.rb 249 def last_page? 250 true 251 end
next_page(options = nil)
click to toggle source
# File lib/cassandra/result.rb 263 def next_page(options = nil) 264 nil 265 end
next_page_async(options = nil)
click to toggle source
Returns the next page or nil when there is no next page.
This is only relevant when you have requested paging of the results with the `:page_size` option to {Cassandra::Session#execute_async}.
@see Cassandra::Session#execute_async
# File lib/cassandra/result.rb 259 def next_page_async(options = nil) 260 @futures.value(nil) 261 end
paging_state()
click to toggle source
# File lib/cassandra/result.rb 267 def paging_state 268 nil 269 end
size()
click to toggle source
Returns count of underlying rows
# File lib/cassandra/result.rb 223 def size 224 0 225 end
Also aliased as: length