All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
as_status.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008-2015 Aerospike, Inc.
3  *
4  * Portions may be licensed to Aerospike, Inc. under one or more contributor
5  * license agreements.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
8  * use this file except in compliance with the License. You may obtain a copy of
9  * the License at http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14  * License for the specific language governing permissions and limitations under
15  * the License.
16  */
17 #pragma once
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 /*******************************************************************************
24  * TYPES
25  ******************************************************************************/
26 
27 /**
28  * Status codes used as return values as as_error.code values.
29  */
30 typedef enum as_status_e {
31 
32  /***************************************************************************
33  * Client Errors
34  **************************************************************************/
35 
36  /**
37  * Query or scan was aborted in user's callback.
38  */
40 
41  /**
42  * Host name could not be found in DNS lookup.
43  */
45 
46  /**
47  * No more records available when parsing batch, scan or query records.
48  */
50 
51  /**
52  * Invalid client API parameter.
53  */
55 
56  /**
57  * Generic client API usage error.
58  */
60 
61  /**
62  * Deprecated. Generic client error. Keep for legacy reasons.
63  */
65 
66  /***************************************************************************
67  * Success
68  **************************************************************************/
69 
70  /**
71  * Generic success.
72  */
74 
75  /***************************************************************************
76  * Server Errors
77  **************************************************************************/
78 
79  /**
80  * Generic error returned by server.
81  */
83 
84  /**
85  * Record does not exist in database. May be returned by read, or write
86  * with policy AS_POLICY_EXISTS_UPDATE.
87  */
89 
90  /**
91  * Generation of record in database does not satisfy write policy.
92  */
94 
95  /**
96  * Request protocol invalid, or invalid protocol field.
97  */
99 
100  /**
101  * Record already exists. May be returned by write with policy
102  * AS_POLICY_EXISTS_CREATE.
103  */
105 
106  /**
107  * Bin already exists.
108  */
110 
111  /**
112  * A cluster state change occurred during the request. This may also be
113  * returned by scan operations with the fail_on_cluster_change flag set.
114  */
116 
117  /**
118  * The server node is running out of memory and/or storage device space
119  * reserved for the specified namespace.
120  */
122 
123  /**
124  * Request timed out. Can be triggered by client or server.
125  */
127 
128  /**
129  * XDR is not available for the cluster.
130  */
132 
133  /**
134  * Generic cluster discovery & connection error.
135  */
137 
138  /**
139  * Bin modification operation can't be done on an existing bin due to its
140  * value type.
141  */
143 
144  /**
145  * Record being (re-)written can't fit in a storage write block.
146  */
148 
149  /**
150  * Too may concurrent requests for one record - a "hot-key" situation.
151  */
153 
154  /**
155  * Scan aborted by user.
156  */
158 
159  /**
160  * Sometimes our doc, or our customers wishes, get ahead of us. We may have
161  * processed something that the server is not ready for (unsupported feature).
162  */
164 
165  /**
166  * Bin-level replace-only supported on server but not on client.
167  */
169 
170  /**
171  * The server node's storage device(s) can't keep up with the write load.
172  */
174 
175  /**
176  * Record key sent with transaction did not match key stored on server.
177  */
179 
180  /**
181  * Namespace in request not found on server.
182  */
184 
185  /**
186  * Sent too-long bin name (should be impossible in this client) or exceeded
187  * namespace's bin name quota.
188  */
190 
191  /**
192  * Operation not allowed at this time.
193  */
195 
196  /**
197  * There are no more records left for query.
198  */
200 
201  /**
202  * Security functionality not supported by connected server.
203  */
205 
206  /**
207  * Security functionality not enabled by connected server.
208  */
210 
211  /**
212  * Security type not supported by connected server.
213  */
215 
216  /**
217  * Administration command is invalid.
218  */
220 
221  /**
222  * Administration field is invalid.
223  */
225 
226  /**
227  * Security protocol not followed.
228  */
230 
231  /**
232  * User name is invalid.
233  */
235 
236  /**
237  * User was previously created.
238  */
240 
241  /**
242  * Password is invalid.
243  */
245 
246  /**
247  * Password has expired.
248  */
250 
251  /**
252  * Forbidden password (e.g. recently used)
253  */
255 
256  /**
257  * Security credential is invalid.
258  */
260 
261  /**
262  * Role name is invalid.
263  */
265 
266  /**
267  * Role already exists.
268  */
270 
271  /**
272  * Privilege is invalid.
273  */
275 
276  /**
277  * User must be authentication before performing database operations.
278  */
280 
281  /**
282  * User does not possess the required role to perform the database operation.
283  */
285 
286  /**
287  * Generic UDF error.
288  */
290 
291  /**
292  * The requested item in a large collection was not found.
293  */
295 
296  /**
297  * Batch functionality has been disabled.
298  */
300 
301  /**
302  * Batch max requests have been exceeded.
303  */
305 
306  /**
307  * All batch queues are full.
308  */
310 
311  /**
312  * Invalid/Unsupported GeoJSON
313  */
315 
316  /**
317  * Index found.
318  */
320 
321  /**
322  * Index not found
323  */
325 
326  /**
327  * Index is out of memory
328  */
330 
331  /**
332  * Unable to read the index.
333  */
335 
336  /**
337  * Generic secondary index error.
338  */
340 
341  /**
342  * Index name is too long.
343  */
345 
346  /**
347  * System already has maximum allowed indices.
348  */
350 
351  /**
352  * Query was aborted.
353  */
355 
356  /**
357  * Query processing queue is full.
358  */
360 
361  /**
362  * Secondary index query timed out on server.
363  */
365 
366  /**
367  * Generic query error.
368  */
370 
371  /***************************************************************************
372  * UDF OPERATIONS
373  **************************************************************************/
374 
375  /**
376  * UDF does not exist.
377  */
379  /**
380  * LUA file does not exist.
381  */
383 
384  /***************************************************************************
385  * Large Data Type (LDT) OPERATIONS
386  **************************************************************************/
387 
388  /** Internal LDT error. */
390 
391  /** LDT item not found */
393 
394  /** Unique key violation: Duplicated item inserted when 'unique key" was set.*/
396 
397  /** General error during insert operation. */
399 
400  /** General error during search operation. */
402 
403  /** General error during delete operation. */
405 
406 
407  /** General input parameter error. */
409 
410  // -------------------------------------------------
411 
412  /** LDT Type mismatch for this bin. */
414 
415  /** The supplied LDT bin name is null. */
417 
418  /** The supplied LDT bin name must be a string. */
420 
421  /** The supplied LDT bin name exceeded the 14 char limit. */
423 
424  /** Internal Error: too many open records at one time. */
426 
427  /** Internal Error: Top Record not found. */
429 
430  /** Internal Error: Sub Record not found. */
432 
433  /** LDT Bin does not exist. */
435 
436  /** Collision: LDT Bin already exists. */
438 
439  /** LDT control structures in the Top Record are damaged. Cannot proceed. */
441 
442  // -------------------------------------------------
443 
444  /** Internal Error: LDT Subrecord pool is damaged. */
446 
447  /** LDT control structures in the Sub Record are damaged. Cannot proceed. */
449 
450  /** Error encountered while opening a Sub Record. */
452 
453  /** Error encountered while updating a Sub Record. */
455 
456  /** Error encountered while creating a Sub Record. */
458 
459  /** Error encountered while deleting a Sub Record. */
461 
462  /** Error encountered while closing a Sub Record. */
464 
465  /** Error encountered while updating a TOP Record. */
467 
468  /** Error encountered while creating a TOP Record. */
470 
471  // -------------------------------------------------
472 
473  /** The filter function name was invalid. */
475 
476  /** The filter function was not found. */
478 
479  /** The function to extract the Unique Value from a complex object was invalid. */
481 
482  /** The function to extract the Unique Value from a complex object was not found. */
484 
485  /** The function to transform an object into a binary form was invalid. */
487 
488  /** The function to transform an object into a binary form was not found. */
490 
491  /** The function to untransform an object from binary form to live form was invalid. */
493 
494  /** The function to untransform an object from binary form to live form not found. */
496 
497  /** The UDF user module name for LDT Overrides was invalid */
499 
500  /** The UDF user module name for LDT Overrides was not found */
502 
503 } as_status;
504 
505 #ifdef __cplusplus
506 } // end extern "C"
507 #endif