Module: Aerospike::ResultCode

Defined in:
lib/aerospike/result_code.rb

Constant Summary collapse

TYPE_NOT_SUPPORTED =

Value type not supported by Aerospike server

-7
COMMAND_REJECTED =

Asynchronous max concurrent database commands have been exceeded and therefore rejected.

-6
QUERY_TERMINATED =

Query was terminated by user.

-5
SCAN_TERMINATED =

Scan was terminated by user.

-4
INVALID_NODE_ERROR =

Chosen node is not currently active.

-3
PARSE_ERROR =

Client parse error.

-2
SERIALIZE_ERROR =

Client serialization error.

-1
OK =

Operation was successful.

0
SERVER_ERROR =

Unknown server failure.

1
KEY_NOT_FOUND_ERROR =

On retrieving, touching or replacing a record that doesn’t exist.

2
GENERATION_ERROR =

On modifying a record with unexpected generation.

3
PARAMETER_ERROR =

Bad parameter(s) were passed in database operation call.

4
KEY_EXISTS_ERROR =

On create-only (write unique) operations on a record that already exists.

5
BIN_EXISTS_ERROR =

On create-only (write unique) operations on a bin that already exists.

6
CLUSTER_KEY_MISMATCH =

Expected cluster ID was not received.

7
SERVER_MEM_ERROR =

Server has run out of memory.

8
TIMEOUT =

Client or server has timed out.

9
NO_XDS =

XDS product is not available.

10
SERVER_NOT_AVAILABLE =

Server is not accepting requests.

11
BIN_TYPE_ERROR =

Operation is not supported with configured bin type (single-bin or multi-bin).

12
RECORD_TOO_BIG =

Record size exceeds limit.

13
KEY_BUSY =

Too many concurrent operations on the same record.

14
SCAN_ABORT =

Scan aborted by server.

15
UNSUPPORTED_FEATURE =

Unsupported Server Feature (e.g. Scan + UDF)

16
BIN_NOT_FOUND =

Specified bin name does not exist in record.

17
DEVICE_OVERLOAD =

Specified bin name does not exist in record.

18
KEY_MISMATCH =

Key type mismatch.

19
QUERY_END =

There are no more records left for query.

50
SECURITY_NOT_SUPPORTED =
51
SECURITY_NOT_ENABLED =
52
SECURITY_SCHEME_NOT_SUPPORTED =
53
INVALID_COMMAND =

Administration command is invalid.

54
INVALID_FIELD =

Administration field is invalid.

55
ILLEGAL_STATE =
56
INVALID_USER =

User name is invalid.

60
USER_ALREADY_EXISTS =

User was previously created.

61
INVALID_PASSWORD =

Password is invalid.

62
EXPIRED_PASSWORD =

Password is invalid.

63
FORBIDDEN_PASSWORD =

Password is invalid.

64
INVALID_CREDENTIAL =

Security credential is invalid.

63
INVALID_ROLE =

Role name is invalid.

70
INVALID_PRIVILEGE =
71
NOT_AUTHENTICATED =

User must be authentication before performing database operations.

80
ROLE_VIOLATION =

User does not posses the required role to perform the database operation.

81
UDF_BAD_RESPONSE =

A user defined function returned an error code.

100
LARGE_ITEM_NOT_FOUND =

The requested item in a large collection was not found.

125
INDEX_FOUND =

Secondary index already exists.

200
INDEX_NOTFOUND =

Requested secondary index does not exist.

201
INDEX_OOM =

Secondary index memory space exceeded.

202
INDEX_NOTREADABLE =

Secondary index not available.

203
INDEX_GENERIC =

Generic secondary index error.

204
INDEX_NAME_MAXLEN =

Index name maximum length exceeded.

205
INDEX_MAXCOUNT =

Maximum number of indicies exceeded.

206
QUERY_ABORTED =

Secondary index query aborted.

210
QUERY_QUEUEFULL =

Secondary index queue full.

211
QUERY_TIMEOUT =

Secondary index query timed out on server.

212
QUERY_GENERIC =

Generic query error.

213

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



21
22
23
# File 'lib/aerospike/result_code.rb', line 21

def code
  @code
end

Class Method Details

.message(code) ⇒ Object



194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
# File 'lib/aerospike/result_code.rb', line 194

def self.message(code)
  case code
  when COMMAND_REJECTED
    "Command rejected"

  when QUERY_TERMINATED
    "Query terminated"

  when SCAN_TERMINATED
    "Scan terminated"

  when INVALID_NODE_ERROR
    "Invalid node"

  when PARSE_ERROR
    "Parse error"

  when SERIALIZE_ERROR
    "Serialize error"

  when OK
    "ok"

  when SERVER_ERROR
    "Server error"

  when KEY_NOT_FOUND_ERROR
    "Key not found"

  when GENERATION_ERROR
    "Generation error"

  when PARAMETER_ERROR
    "Parameter error"

  when KEY_EXISTS_ERROR
    "Key already exists"

  when BIN_EXISTS_ERROR
    "Bin already exists"

  when CLUSTER_KEY_MISMATCH
    "Cluster key mismatch"

  when SERVER_MEM_ERROR
    "Server memory error"

  when TIMEOUT
    "Timeout"

  when NO_XDS
    "XDS not available"

  when SERVER_NOT_AVAILABLE
    "Server not available"

  when BIN_TYPE_ERROR
    "Bin type error"

  when RECORD_TOO_BIG
    "Record too big"

  when KEY_BUSY
    "Hot key"

  when SCAN_ABORT
    "Scan aborted"

  when UNSUPPORTED_FEATURE
    "Unsupported Server Feature"

  when BIN_NOT_FOUND
    "Bin not found"

  when DEVICE_OVERLOAD
    "Device overload"

  when KEY_MISMATCH
    "Key mismatch"

  when QUERY_END
    "Query end"

  when SECURITY_NOT_SUPPORTED
    "Security not supported"

  when SECURITY_NOT_ENABLED
    "Security not enabled"

  when SECURITY_SCHEME_NOT_SUPPORTED
    "Security scheme not supported"

  when INVALID_COMMAND
    "Invalid command"

  when INVALID_FIELD
    "Invalid field"

  when ILLEGAL_STATE
    "Illegal state"

  when INVALID_USER
    "Invalid user"

  when USER_ALREADY_EXISTS
    "User already exists"

  when INVALID_PASSWORD
    "Invalid password"

  when EXPIRED_PASSWORD
    "Expired password"

  when FORBIDDEN_PASSWORD
    "Forbidden password"

  when INVALID_CREDENTIAL
    "Invalid credential"

  when INVALID_ROLE
    "Invalid role"

  when INVALID_PRIVILEGE
    "Invalid privilege"

  when NOT_AUTHENTICATED
    "Not authenticated"

  when ROLE_VIOLATION
    "Role violation"

  when UDF_BAD_RESPONSE
    "UDF d error"

  when LARGE_ITEM_NOT_FOUND
     "Large collection item not found"

  when INDEX_FOUND
    "Index already exists"

  when INDEX_NOTFOUND
    "Index not found"

  when INDEX_OOM
    "Index out of memory"

  when INDEX_NOTREADABLE
    "Index not readable"

  when INDEX_GENERIC
    "Index error"

  when INDEX_NAME_MAXLEN
    "Index name max length exceeded"

  when INDEX_MAXCOUNT
    "Index count exceeds max"

  when QUERY_ABORTED
    "Query aborted"

  when QUERY_QUEUEFULL
    "Query queue full"

  when QUERY_TIMEOUT
    "Query timeout"

  when QUERY_GENERIC
    "Query error"

  else
    "ResultCode #{code} unknown in the client. Please file a github issue."
  end # case

end