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  * Host name could not be found in DNS lookup.
38  */
40 
41  /**
42  * No more records available when parsing batch, scan or query records.
43  */
45 
46  /**
47  * Invalid client API parameter.
48  */
50 
51  /**
52  * Generic client API usage error.
53  */
55 
56  /**
57  * Deprecated. Generic client error. Keep for legacy reasons.
58  */
60 
61  /***************************************************************************
62  * Success
63  **************************************************************************/
64 
65  /**
66  * Generic success.
67  */
69 
70  /***************************************************************************
71  * Server Errors
72  **************************************************************************/
73 
74  /**
75  * Generic error returned by server.
76  */
78 
79  /**
80  * Record does not exist in database. May be returned by read, or write
81  * with policy AS_POLICY_EXISTS_UPDATE.
82  */
84 
85  /**
86  * Generation of record in database does not satisfy write policy.
87  */
89 
90  /**
91  * Request protocol invalid, or invalid protocol field.
92  */
94 
95  /**
96  * Record already exists. May be returned by write with policy
97  * AS_POLICY_EXISTS_CREATE.
98  */
100 
101  /**
102  * Bin already exists.
103  */
105 
106  /**
107  * A cluster state change occurred during the request. This may also be
108  * returned by scan operations with the fail_on_cluster_change flag set.
109  */
111 
112  /**
113  * The server node is running out of memory and/or storage device space
114  * reserved for the specified namespace.
115  */
117 
118  /**
119  * Request timed out. Can be triggered by client or server.
120  */
122 
123  /**
124  * XDR is not available for the cluster.
125  */
127 
128  /**
129  * Generic cluster discovery & connection error.
130  */
132 
133  /**
134  * Bin modification operation can't be done on an existing bin due to its
135  * value type.
136  */
138 
139  /**
140  * Record being (re-)written can't fit in a storage write block.
141  */
143 
144  /**
145  * Too may concurrent requests for one record - a "hot-key" situation.
146  */
148 
149  /**
150  * Scan aborted by user.
151  */
153 
154  /**
155  * Sometimes our doc, or our customers wishes, get ahead of us. We may have
156  * processed something that the server is not ready for (unsupported feature).
157  */
159 
160  /**
161  * Bin-level replace-only supported on server but not on client.
162  */
164 
165  /**
166  * The server node's storage device(s) can't keep up with the write load.
167  */
169 
170  /**
171  * Record key sent with transaction did not match key stored on server.
172  */
174 
175  /**
176  * Namespace in request not found on server.
177  */
179 
180  /**
181  * Sent too-long bin name (should be impossible in this client) or exceeded
182  * namespace's bin name quota.
183  */
185 
186  /**
187  * Operation not allowed at this time.
188  */
190 
191  /**
192  * There are no more records left for query.
193  */
195 
196  /**
197  * Security functionality not supported by connected server.
198  */
200 
201  /**
202  * Security functionality not enabled by connected server.
203  */
205 
206  /**
207  * Security type not supported by connected server.
208  */
210 
211  /**
212  * Administration command is invalid.
213  */
215 
216  /**
217  * Administration field is invalid.
218  */
220 
221  /**
222  * Security protocol not followed.
223  */
225 
226  /**
227  * User name is invalid.
228  */
230 
231  /**
232  * User was previously created.
233  */
235 
236  /**
237  * Password is invalid.
238  */
240 
241  /**
242  * Password has expired.
243  */
245 
246  /**
247  * Forbidden password (e.g. recently used)
248  */
250 
251  /**
252  * Security credential is invalid.
253  */
255 
256  /**
257  * Role name is invalid.
258  */
260 
261  /**
262  * Role already exists.
263  */
265 
266  /**
267  * Privilege is invalid.
268  */
270 
271  /**
272  * User must be authentication before performing database operations.
273  */
275 
276  /**
277  * User does not possess the required role to perform the database operation.
278  */
280 
281  /**
282  * Generic UDF error.
283  */
285 
286  /**
287  * The requested item in a large collection was not found.
288  */
290 
291  /**
292  * Index found.
293  */
295 
296  /**
297  * Index not found
298  */
300 
301  /**
302  * Index is out of memory
303  */
305 
306  /**
307  * Unable to read the index.
308  */
310 
311  /**
312  * Generic secondary index error.
313  */
315 
316  /**
317  * Index name is too long.
318  */
320 
321  /**
322  * System already has maximum allowed indices.
323  */
325 
326  /**
327  * Query was aborted.
328  */
330 
331  /**
332  * Query processing queue is full.
333  */
335 
336  /**
337  * Secondary index query timed out on server.
338  */
340 
341  /**
342  * Generic query error.
343  */
345 
346  /***************************************************************************
347  * UDF OPERATIONS
348  **************************************************************************/
349 
350  /**
351  * UDF does not exist.
352  */
354  /**
355  * LUA file does not exist.
356  */
358 
359  /***************************************************************************
360  * Large Data Type (LDT) OPERATIONS
361  **************************************************************************/
362 
363  /** Internal LDT error. */
365 
366  /** LDT item not found */
368 
369  /** Unique key violation: Duplicated item inserted when 'unique key" was set.*/
371 
372  /** General error during insert operation. */
374 
375  /** General error during search operation. */
377 
378  /** General error during delete operation. */
380 
381 
382  /** General input parameter error. */
384 
385  // -------------------------------------------------
386 
387  /** LDT Type mismatch for this bin. */
389 
390  /** The supplied LDT bin name is null. */
392 
393  /** The supplied LDT bin name must be a string. */
395 
396  /** The supplied LDT bin name exceeded the 14 char limit. */
398 
399  /** Internal Error: too many open records at one time. */
401 
402  /** Internal Error: Top Record not found. */
404 
405  /** Internal Error: Sub Record not found. */
407 
408  /** LDT Bin does not exist. */
410 
411  /** Collision: LDT Bin already exists. */
413 
414  /** LDT control structures in the Top Record are damaged. Cannot proceed. */
416 
417  // -------------------------------------------------
418 
419  /** Internal Error: LDT Subrecord pool is damaged. */
421 
422  /** LDT control structures in the Sub Record are damaged. Cannot proceed. */
424 
425  /** Error encountered while opening a Sub Record. */
427 
428  /** Error encountered while updating a Sub Record. */
430 
431  /** Error encountered while creating a Sub Record. */
433 
434  /** Error encountered while deleting a Sub Record. */
436 
437  /** Error encountered while closing a Sub Record. */
439 
440  /** Error encountered while updating a TOP Record. */
442 
443  /** Error encountered while creating a TOP Record. */
445 
446  // -------------------------------------------------
447 
448  /** The filter function name was invalid. */
450 
451  /** The filter function was not found. */
453 
454  /** The function to extract the Unique Value from a complex object was invalid. */
456 
457  /** The function to extract the Unique Value from a complex object was not found. */
459 
460  /** The function to transform an object into a binary form was invalid. */
462 
463  /** The function to transform an object into a binary form was not found. */
465 
466  /** The function to untransform an object from binary form to live form was invalid. */
468 
469  /** The function to untransform an object from binary form to live form not found. */
471 
472  /** The UDF user module name for LDT Overrides was invalid */
474 
475  /** The UDF user module name for LDT Overrides was not found */
477 
478 } as_status;
479 
480 #ifdef __cplusplus
481 } // end extern "C"
482 #endif