44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# File 'lib/aerospike/command/exists_command.rb', line 44
def parse_result
@conn.read(@data_buffer, )
result_code = @data_buffer.read(13).ord & 0xFF
if result_code == 0
@exists = true
return
end
if result_code == Aerospike::ResultCode::KEY_NOT_FOUND_ERROR
@exists = false
return
end
if result_code == Aerospike::ResultCode::FILTERED_OUT
if @policy.fail_on_filtered_out
raise Aerospike::Exceptions::Aerospike.new(result_code, nil, [@node])
end
@exists = true
return
end
raise Aerospike::Exceptions::Aerospike.new(result_code, nil, [@node])
end
|