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