class Aerospike::ServerCommand
Attributes
background[RW]
cluster[RW]
statement[RW]
task_id[RW]
write_policy[RW]
Public Class Methods
new(cluster, node, policy, statement, background, task_id)
click to toggle source
Calls superclass method
# File lib/aerospike/query/server_command.rb, line 22 def initialize(cluster, node, policy, statement, background, task_id) super(node) @statement = statement @task_id = task_id @cluster = cluster @policy = policy @background = background end
Public Instance Methods
parse_row(result_code)
click to toggle source
# File lib/aerospike/query/server_command.rb, line 39 def parse_row(result_code) field_count = @data_buffer.read_int16(18) result_code = @data_buffer.read(5).ord & 0xFF skip_key(field_count) if result_code != 0 if result_code == Aerospike::ResultCode::KEY_NOT_FOUND_ERROR return false end raise Aerospike::Exceptions::Aerospike.new(result_code) end op_count = @data_buffer.read_int16(20) if op_count <= 0 return Record.new(@node, key, bins, generation, expiration) end unless valid? raise Aerospike::Exceptions::QueryTerminated end end
write?()
click to toggle source
# File lib/aerospike/query/server_command.rb, line 31 def write? true end
write_buffer()
click to toggle source
# File lib/aerospike/query/server_command.rb, line 35 def write_buffer set_query(@cluster, @policy, @statement, true, nil) end