class Cql::Client::VoidResult

Many CQL queries do not return any rows, but they can still return data about the query, for example the trace ID. This class exist to make that data available.

It has the exact same API as {Cql::Client::QueryResult} so that you don’t need to check the return value of for example {Cql::Client::Client#execute}.

@see Cql::Client::QueryResult @see Cql::Client::Client#execute @see Cql::Client::PreparedStatement#execute

Constants

EMPTY_METADATA
INSTANCE

Attributes

metadata[R]

@return [ResultMetadata]

trace_id[R]

The ID of the query trace associated with the query, if any.

@return [Cql::Uuid]

Public Class Methods

new(trace_id=nil) click to toggle source

@private

# File lib/cql/client/void_result.rb, line 29
def initialize(trace_id=nil)
  @trace_id = trace_id
  @metadata = EMPTY_METADATA
end

Public Instance Methods

each(&block) click to toggle source

No-op for API compatibility with {QueryResult}.

@return [Enumerable]

# File lib/cql/client/void_result.rb, line 52
def each(&block)
  self
end
Also aliased as: each_row
each_row(&block)
Alias for: each
empty?() click to toggle source

Always returns true

# File lib/cql/client/void_result.rb, line 35
def empty?
  true
end
last_page?() click to toggle source

Always returns true

# File lib/cql/client/void_result.rb, line 40
def last_page?
  true
end
next_page() click to toggle source

Always returns nil

# File lib/cql/client/void_result.rb, line 45
def next_page
  nil
end