Class: Aerospike::QueryCommand

Inherits:
StreamCommand show all
Defined in:
lib/aerospike/query/query_command.rb

Overview

:nodoc:

Direct Known Subclasses

QueryPartitionCommand

Instance Method Summary collapse

Methods inherited from StreamCommand

#parse_group

Methods inherited from MultiCommand

#compressed?, #get_node, #parse_group, #parse_key, #parse_record, #parse_result, #read_bytes, #skip_key, #stop, #valid?

Methods inherited from Command

#execute, #set_delete, #set_exists, #set_operate, #set_query, #set_read, #set_read_for_key_only, #set_read_header, #set_scan, #set_touch, #set_udf, #set_write, #write_bins

Constructor Details

#initialize(cluster, node, policy, statement, recordset, partitions) ⇒ QueryCommand

Returns a new instance of QueryCommand.



26
27
28
29
30
31
32
33
# File 'lib/aerospike/query/query_command.rb', line 26

def initialize(cluster, node, policy, statement, recordset, partitions)
  super(node)
  @cluster = cluster
  @policy = policy
  @statement = statement
  @recordset = recordset
  @partitions = partitions
end

Instance Method Details

#is_scan?Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/aerospike/query/query_command.rb', line 39

def is_scan?
  @statement.filters.nil? || @statement.filters.empty?
end

#write_bufferObject



35
36
37
# File 'lib/aerospike/query/query_command.rb', line 35

def write_buffer
  set_query(@cluster, @policy, @statement, false, @partitions)
end