All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
aerospike_key.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008-2022 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 /**
20  * @defgroup key_operations Key Operations
21  * @ingroup client_operations
22  *
23  * Aerospike provides a key based API to access and modify data into the
24  * cluster.
25  *
26  * The Key API is a collection of APIs that use as_key as for looking up
27  * records for accessing and modifying in the cluster.
28  *
29  */
30 
31 #include <aerospike/aerospike.h>
32 #include <aerospike/as_listener.h>
33 #include <aerospike/as_error.h>
34 #include <aerospike/as_key.h>
35 #include <aerospike/as_list.h>
37 #include <aerospike/as_policy.h>
38 #include <aerospike/as_record.h>
39 #include <aerospike/as_status.h>
40 #include <aerospike/as_val.h>
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 /******************************************************************************
47  * FUNCTIONS
48  *****************************************************************************/
49 
50 /**
51  * Look up a record by key and return all bins.
52  *
53  * ~~~~~~~~~~{.c}
54  * as_key key;
55  * as_key_init(&key, "ns", "set", "key");
56  *
57  * as_record* rec = NULL;
58  * if (aerospike_key_get(&as, &err, NULL, &key, &rec) != AEROSPIKE_OK) {
59  * printf("error(%d) %s at [%s:%d]", err.code, err.message, err.file, err.line);
60  * }
61  * else {
62  * as_record_destroy(rec);
63  * }
64  * ~~~~~~~~~~
65  *
66  * @param as The aerospike instance to use for this operation.
67  * @param err The as_error to be populated if an error occurs.
68  * @param policy The policy to use for this operation. If NULL, then the default policy will be used.
69  * @param key The key of the record.
70  * @param rec The record to be populated with the data from request. If the record pointer is
71  * preset to NULL, the record will be created and initialized. If the record pointer
72  * is not NULL, the record is assumed to be valid and will be reused. Either way,
73  * the record must be preset.
74  *
75  * @return AEROSPIKE_OK if successful. Otherwise an error.
76  *
77  * @ingroup key_operations
78  */
81  aerospike* as, as_error* err, const as_policy_read* policy, const as_key* key, as_record** rec
82  );
83 
84 /**
85  * Asynchronously look up a record by key and return all bins.
86  *
87  * ~~~~~~~~~~{.c}
88  * void my_listener(as_error* err, as_record* record, void* udata, as_event_loop* event_loop)
89  * {
90  * if (err) {
91  * printf("Command failed: %d %s\n", err->code, err->message);
92  * return;
93  * }
94  * // Process record bins
95  * // Only call as_record_destroy(record) when command is successful (err == NULL) and
96  * // "as_policy_read.async_heap_rec" is true. Otherwise, the calling function will destroy the
97  * // record when the listener completes.
98  * }
99  *
100  * as_key key;
101  * as_key_init(&key, "ns", "set", "key");
102  *
103  * as_status status = aerospike_key_get_async(&as, &err, NULL, &key, my_listener, NULL, NULL, NULL);
104  * ~~~~~~~~~~
105  *
106  * @param as The aerospike instance to use for this operation.
107  * @param err The as_error to be populated if an error occurs.
108  * @param policy The policy to use for this operation. If NULL, then the default policy will be used.
109  * @param key The key of the record.
110  * @param listener User function to be called with command results.
111  * @param udata User data to be forwarded to user callback.
112  * @param event_loop Event loop assigned to run this command. If NULL, an event loop will be chosen by round-robin.
113  * @param pipe_listener Enables command pipelining, if not NULL. The given callback is invoked after the current command
114  * has been sent to the server. This allows for issuing the next command even before receiving a
115  * result for the current command.
116  *
117  * @return AEROSPIKE_OK if async command successfully queued. Otherwise an error.
118  *
119  * @ingroup key_operations
120  */
123  aerospike* as, as_error* err, const as_policy_read* policy, const as_key* key,
124  as_async_record_listener listener, void* udata, as_event_loop* event_loop,
125  as_pipe_listener pipe_listener
126  );
127 
128 /**
129  * Lookup a record by key, then return specified bins.
130  *
131  * ~~~~~~~~~~{.c}
132  * char* select[] = {"bin1", "bin2", "bin3", NULL};
133  *
134  * as_key key;
135  * as_key_init(&key, "ns", "set", "key");
136  *
137  * as_record* rec = NULL;
138  * if (aerospike_key_select(&as, &err, NULL, &key, select, &rec) != AEROSPIKE_OK) {
139  * printf("error(%d) %s at [%s:%d]", err.code, err.message, err.file, err.line);
140  * }
141  * else {
142  * as_record_destroy(rec);
143  * }
144  * ~~~~~~~~~~
145  *
146  * @param as The aerospike instance to use for this operation.
147  * @param err The as_error to be populated if an error occurs.
148  * @param policy The policy to use for this operation. If NULL, then the default policy will be used.
149  * @param key The key of the record.
150  * @param bins The bins to select. A NULL terminated array of NULL terminated strings.
151  * @param rec The record to be populated with the data from request. If the record pointer is
152  * preset to NULL, the record will be created and initialized. If the record pointer
153  * is not NULL, the record is assumed to be valid and will be reused. Either way,
154  * the record must be preset.
155  *
156  * @return AEROSPIKE_OK if successful. Otherwise an error.
157  *
158  * @ingroup key_operations
159  */
162  aerospike* as, as_error* err, const as_policy_read* policy, const as_key* key,
163  const char* bins[], as_record** rec
164  );
165 
166 /**
167  * Asynchronously lookup a record by key, then return specified bins.
168  *
169  * ~~~~~~~~~~{.c}
170  * void my_listener(as_error* err, as_record* record, void* udata, as_event_loop* event_loop)
171  * {
172  * if (err) {
173  * printf("Command failed: %d %s\n", err->code, err->message);
174  * return;
175  * }
176  * // Process record bins
177  * // Only call as_record_destroy(record) when command is successful (err == NULL) and
178  * // "as_policy_read.async_heap_rec" is true. Otherwise, the calling function will destroy the
179  * // record when the listener completes.
180  * }
181  *
182  * char* select[] = {"bin1", "bin2", "bin3", NULL};
183  *
184  * as_key key;
185  * as_key_init(&key, "ns", "set", "key");
186  *
187  * as_status status = aerospike_key_select_async(&as, &err, NULL, &key, select, my_listener, NULL, NULL, NULL);
188  * ~~~~~~~~~~
189  *
190  * @param as The aerospike instance to use for this operation.
191  * @param err The as_error to be populated if an error occurs.
192  * @param policy The policy to use for this operation. If NULL, then the default policy will be used.
193  * @param key The key of the record.
194  * @param bins The bins to select. A NULL terminated array of NULL terminated strings.
195  * @param listener User function to be called with command results.
196  * @param udata User data to be forwarded to user callback.
197  * @param event_loop Event loop assigned to run this command. If NULL, an event loop will be chosen by round-robin.
198  * @param pipe_listener Enables command pipelining, if not NULL. The given callback is invoked after the current command
199  * has been sent to the server. This allows for issuing the next command even before receiving a
200  * result for the current command.
201  *
202  * @return AEROSPIKE_OK if async command successfully queued. Otherwise an error.
203  *
204  * @ingroup key_operations
205  */
208  aerospike* as, as_error* err, const as_policy_read* policy, const as_key* key, const char* bins[],
209  as_async_record_listener listener, void* udata, as_event_loop* event_loop, as_pipe_listener pipe_listener
210  );
211 
212 /**
213  * Check if a record exists in the cluster via its key. The record's metadata
214  * will be populated if the record exists.
215  *
216  * ~~~~~~~~~~{.c}
217  * as_key key;
218  * as_key_init(&key, "ns", "set", "key");
219  *
220  * as_record* rec = NULL;
221  * if (aerospike_key_exists(&as, &err, NULL, &key, &rec) != AEROSPIKE_OK) {
222  * printf("error(%d) %s at [%s:%d]", err.code, err.message, err.file, err.line);
223  * }
224  * else {
225  * if (rec) {
226  * printf("Record exists.");
227  * as_record_destroy(rec);
228  * }
229  * else {
230  * printf("Record doesn't exist.");
231  * }
232  * }
233  * ~~~~~~~~~~
234  *
235  * @param as The aerospike instance to use for this operation.
236  * @param err The as_error to be populated if an error occurs.
237  * @param policy The policy to use for this operation. If NULL, then the default policy will be used.
238  * @param key The key of the record.
239  * @param rec The metadata will be populated if the record exists. If the record pointer is
240  * preset to NULL, the record will be created and initialized. If the record pointer
241  * is not NULL, the record is assumed to be valid and will be reused. Either way,
242  * the record must be preset.
243  *
244  * @return AEROSPIKE_OK if successful. AEROSPIKE_ERR_RECORD_NOT_FOUND if not found. Otherwise an error.
245  *
246  * @ingroup key_operations
247  */
250  aerospike* as, as_error* err, const as_policy_read* policy, const as_key* key, as_record** rec
251  );
252 
253 /**
254  * Asynchronously check if a record exists in the cluster via its key. The record's metadata
255  * will be populated if the record exists.
256  *
257  * ~~~~~~~~~~{.c}
258  * void my_listener(as_error* err, as_record* record, void* udata, as_event_loop* event_loop)
259  * {
260  * if (err) {
261  * printf("Command failed: %d %s\n", err->code, err->message);
262  * return;
263  * }
264  * if (record) {
265  * printf("Record exists.");
266  * // Only call as_record_destroy(record) when the record exists, the command is successful
267  * // (err == NULL) and "as_policy_read.async_heap_rec" is true. Otherwise, the calling
268  * // function will destroy the record when the listener completes.
269  * }
270  * else {
271  * printf("Record doesn't exist.");
272  * }
273  * }
274  *
275  * as_key key;
276  * as_key_init(&key, "ns", "set", "key");
277  *
278  * as_status status = aerospike_key_exists_async(&as, &err, NULL, &key, my_listener, NULL, NULL, NULL);
279  * ~~~~~~~~~~
280  *
281  * @param as The aerospike instance to use for this operation.
282  * @param err The as_error to be populated if an error occurs.
283  * @param policy The policy to use for this operation. If NULL, then the default policy will be used.
284  * @param key The key of the record.
285  * @param listener User function to be called with command results.
286  * @param udata User data to be forwarded to user callback.
287  * @param event_loop Event loop assigned to run this command. If NULL, an event loop will be chosen by round-robin.
288  * @param pipe_listener Enables command pipelining, if not NULL. The given callback is invoked after the current command
289  * has been sent to the server. This allows for issuing the next command even before receiving a
290  * result for the current command.
291  *
292  * @return AEROSPIKE_OK if async command successfully queued. Otherwise an error.
293  *
294  * @ingroup key_operations
295  */
298  aerospike* as, as_error* err, const as_policy_read* policy, const as_key* key,
299  as_async_record_listener listener, void* udata, as_event_loop* event_loop,
300  as_pipe_listener pipe_listener
301  );
302 
303 /**
304  * Store a record in the cluster.
305  *
306  * ~~~~~~~~~~{.c}
307  * as_key key;
308  * as_key_init(&key, "ns", "set", "key");
309  *
310  * as_record rec;
311  * as_record_init(&rec, 2);
312  * as_record_set_str(&rec, "bin1", "abc");
313  * as_record_set_int64(&rec, "bin2", 123);
314  *
315  * if (aerospike_key_put(&as, &err, NULL, &key, &rec) != AEROSPIKE_OK) {
316  * printf("error(%d) %s at [%s:%d]", err.code, err.message, err.file, err.line);
317  * }
318  * as_record_destroy(&rec);
319  * ~~~~~~~~~~
320  *
321  * @param as The aerospike instance to use for this operation.
322  * @param err The as_error to be populated if an error occurs.
323  * @param policy The policy to use for this operation. If NULL, then the default policy will be used.
324  * @param key The key of the record.
325  * @param rec The record containing the data to be written.
326  *
327  * @return AEROSPIKE_OK if successful. Otherwise an error.
328  *
329  * @ingroup key_operations
330  */
333  aerospike* as, as_error* err, const as_policy_write* policy, const as_key* key, as_record* rec
334  );
335 
336 /**
337  * Asynchronously store a record in the cluster.
338  *
339  * ~~~~~~~~~~{.c}
340  * void my_listener(as_error* err, void* udata, as_event_loop* event_loop)
341  * {
342  * if (err) {
343  * printf("Command failed: %d %s\n", err->code, err->message);
344  * return;
345  * }
346  * printf("Command succeeded\n");
347  * }
348  *
349  * as_key key;
350  * as_key_init(&key, "ns", "set", "key");
351  *
352  * as_record rec;
353  * as_record_init(&rec, 2);
354  * as_record_set_str(&rec, "bin1", "abc");
355  * as_record_set_int64(&rec, "bin2", 123);
356  *
357  * as_status status = aerospike_key_put_async(&as, &err, NULL, &key, &rec, my_listener, NULL, NULL, NULL);
358  * as_record_destroy(&rec);
359  * ~~~~~~~~~~
360  *
361  * @param as The aerospike instance to use for this operation.
362  * @param err The as_error to be populated if an error occurs.
363  * @param policy The policy to use for this operation. If NULL, then the default policy will be used.
364  * @param key The key of the record.
365  * @param rec The record containing the data to be written.
366  * @param listener User function to be called with command results.
367  * @param udata User data to be forwarded to user callback.
368  * @param event_loop Event loop assigned to run this command. If NULL, an event loop will be chosen by round-robin.
369  * @param pipe_listener Enables command pipelining, if not NULL. The given callback is invoked after the current command
370  * has been sent to the server. This allows for issuing the next command even before receiving a
371  * result for the current command.
372  *
373  * @return AEROSPIKE_OK if async command successfully queued. Otherwise an error.
374  *
375  * @ingroup key_operations
376  */
379  aerospike* as, as_error* err, const as_policy_write* policy, const as_key* key, as_record* rec,
380  as_async_write_listener listener, void* udata, as_event_loop* event_loop, as_pipe_listener pipe_listener
381  );
382 
383 /**
384  * Remove a record from the cluster.
385  *
386  * ~~~~~~~~~~{.c}
387  * as_key key;
388  * as_key_init(&key, "ns", "set", "key");
389  *
390  * if (aerospike_key_remove(&as, &err, NULL, &key) != AEROSPIKE_OK) {
391  * printf("error(%d) %s at [%s:%d]", err.code, err.message, err.file, err.line);
392  * }
393  * ~~~~~~~~~~
394  *
395  * @param as The aerospike instance to use for this operation.
396  * @param err The as_error to be populated if an error occurs.
397  * @param policy The policy to use for this operation. If NULL, then the default policy will be used.
398  * @param key The key of the record.
399  *
400  * @return AEROSPIKE_OK if successful and AEROSPIKE_ERR_RECORD_NOT_FOUND if the record was not found. Otherwise an error.
401  *
402  * @ingroup key_operations
403  */
406  aerospike* as, as_error* err, const as_policy_remove* policy, const as_key* key
407  );
408 
409 /**
410  * Asynchronously remove a record from the cluster.
411  *
412  * ~~~~~~~~~~{.c}
413  * void my_listener(as_error* err, void* udata, as_event_loop* event_loop)
414  * {
415  * if (err) {
416  * printf("Command failed: %d %s\n", err->code, err->message);
417  * return;
418  * }
419  * printf("Command succeeded\n");
420  * }
421  *
422  * as_key key;
423  * as_key_init(&key, "ns", "set", "key");
424  *
425  * as_status status = aerospike_key_remove(&as, &err, NULL, &key, my_listener, NULL, NULL, NULL);
426  * ~~~~~~~~~~
427  *
428  * @param as The aerospike instance to use for this operation.
429  * @param err The as_error to be populated if an error occurs.
430  * @param policy The policy to use for this operation. If NULL, then the default policy will be used.
431  * @param key The key of the record.
432  * @param listener User function to be called with command results.
433  * @param udata User data to be forwarded to user callback.
434  * @param event_loop Event loop assigned to run this command. If NULL, an event loop will be chosen by round-robin.
435  * @param pipe_listener Enables command pipelining, if not NULL. The given callback is invoked after the current command
436  * has been sent to the server. This allows for issuing the next command even before receiving a
437  * result for the current command.
438  *
439  * @return AEROSPIKE_OK if async command successfully queued. Otherwise an error.
440  *
441  * @ingroup key_operations
442  */
445  aerospike* as, as_error* err, const as_policy_remove* policy, const as_key* key,
446  as_async_write_listener listener, void* udata, as_event_loop* event_loop,
447  as_pipe_listener pipe_listener
448  );
449 
450 /**
451  * Lookup a record by key, then perform specified operations.
452  *
453  * ~~~~~~~~~~{.c}
454  * as_key key;
455  * as_key_init(&key, "ns", "set", "key");
456  *
457  * as_operations ops;
458  * as_operations_inita(&ops,3);
459  * as_operations_add_incr(&ops, "bin1", 456);
460  * as_operations_add_append_str(&ops, "bin2", "def");
461  * as_operations_add_read(&ops, "bin1")
462  *
463  * as_record* rec = NULL;
464  *
465  * if (aerospike_key_operate(&as, &err, NULL, &key, &ops, &rec) != AEROSPIKE_OK) {
466  * printf("error(%d) %s at [%s:%d]", err.code, err.message, err.file, err.line);
467  * }
468  * else {
469  * as_record_destroy(rec);
470  * }
471  * as_operations_destroy(&ops);
472  * ~~~~~~~~~~
473  *
474  * @param as The aerospike instance to use for this operation.
475  * @param err The as_error to be populated if an error occurs.
476  * @param policy The policy to use for this operation. If NULL, then the default policy will be used.
477  * @param key The key of the record.
478  * @param ops The operations to perform on the record.
479  * @param rec The record to be populated with the data from AS_OPERATOR_READ operations.
480  *
481  * @return AEROSPIKE_OK if successful. Otherwise an error.
482  *
483  * @ingroup key_operations
484  */
487  aerospike* as, as_error* err, const as_policy_operate* policy, const as_key* key,
488  const as_operations* ops, as_record** rec
489  );
490 
491 /**
492  * Asynchronously lookup a record by key, then perform specified operations.
493  *
494  * ~~~~~~~~~~{.c}
495  * void my_listener(as_error* err, as_record* record, void* udata, as_event_loop* event_loop)
496  * {
497  * if (err) {
498  * printf("Command failed: %d %s\n", err->code, err->message);
499  * return;
500  * }
501  * // Process record bins
502  * // Only call as_record_destroy(record) when command is successful (err == NULL) and
503  * // "as_policy_operate.async_heap_rec" is true. Otherwise, the calling function will destroy
504  * // the record when the listener completes.
505  * }
506  *
507  * as_key key;
508  * as_key_init(&key, "ns", "set", "key");
509  *
510  * as_operations ops;
511  * as_operations_inita(&ops,3);
512  * as_operations_add_incr(&ops, "bin1", 456);
513  * as_operations_add_append_str(&ops, "bin2", "def");
514  * as_operations_add_read(&ops, "bin1")
515  *
516  * as_status status = aerospike_key_operate(&as, &err, NULL, &key, &ops, my_listener, NULL, NULL, NULL);
517  * as_operations_destroy(&ops);
518  * ~~~~~~~~~~
519  *
520  * @param as The aerospike instance to use for this operation.
521  * @param err The as_error to be populated if an error occurs.
522  * @param policy The policy to use for this operation. If NULL, then the default policy will be used.
523  * @param key The key of the record.
524  * @param ops The operations to perform on the record.
525  * @param listener User function to be called with command results.
526  * @param udata User data to be forwarded to user callback.
527  * @param event_loop Event loop assigned to run this command. If NULL, an event loop will be chosen by round-robin.
528  * @param pipe_listener Enables command pipelining, if not NULL. The given callback is invoked after the current command
529  * has been sent to the server. This allows for issuing the next command even before receiving a
530  * result for the current command.
531  *
532  * @return AEROSPIKE_OK if async command successfully queued. Otherwise an error.
533  *
534  * @ingroup key_operations
535  */
538  aerospike* as, as_error* err, const as_policy_operate* policy, const as_key* key, const as_operations* ops,
539  as_async_record_listener listener, void* udata, as_event_loop* event_loop, as_pipe_listener pipe_listener
540  );
541 
542 /**
543  * Lookup a record by key, then apply the UDF.
544  *
545  * ~~~~~~~~~~{.c}
546  * as_key key;
547  * as_key_init(&key, "ns", "set", "key");
548  *
549  * as_arraylist args;
550  * as_arraylist_inita(&args, 2);
551  * as_arraylist_append_int64(&args, 1);
552  * as_arraylist_append_int64(&args, 2);
553  *
554  * as_val * res = NULL;
555  *
556  * if (aerospike_key_apply(&as, &err, NULL, &key, "math", "add", &args, &res) != AEROSPIKE_OK) {
557  * printf("error(%d) %s at [%s:%d]", err.code, err.message, err.file, err.line);
558  * }
559  * else {
560  * as_val_destroy(res);
561  * }
562  *
563  * as_arraylist_destroy(&args);
564  * ~~~~~~~~~~
565  *
566  *
567  * @param as The aerospike instance to use for this operation.
568  * @param err The as_error to be populated if an error occurs.
569  * @param policy The policy to use for this operation. If NULL, then the default policy will be used.
570  * @param key The key of the record.
571  * @param module The module containing the function to execute.
572  * @param function The function to execute.
573  * @param arglist The arguments for the function.
574  * @param result The return value from the function.
575  *
576  * @return AEROSPIKE_OK if successful. Otherwise an error.
577  *
578  * @ingroup key_operations
579  */
582  aerospike* as, as_error* err, const as_policy_apply* policy, const as_key* key,
583  const char* module, const char* function, as_list* arglist, as_val** result
584  );
585 
586 /**
587  * Asynchronously lookup a record by key, then apply the UDF.
588  *
589  * ~~~~~~~~~~{.c}
590  * void my_listener(as_error* err, as_val* val, void* udata, as_event_loop* event_loop)
591  * {
592  * if (err) {
593  * printf("Command failed: %d %s\n", err->code, err->message);
594  * return;
595  * }
596  * // Process value. The calling function will call as_val_destroy().
597  * // If the value needs to be preserved, bump up the reference count using as_val_reserve()
598  * // and call as_val_destroy() when done with the value.
599  * }
600  *
601  * as_key key;
602  * as_key_init(&key, "ns", "set", "key");
603  *
604  * as_arraylist args;
605  * as_arraylist_inita(&args, 2);
606  * as_arraylist_append_int64(&args, 1);
607  * as_arraylist_append_int64(&args, 2);
608  *
609  * as_status status = aerospike_key_apply(&as, &err, NULL, &key, "math", "add", &args, my_listener, NULL, NULL, NULL);
610  * as_arraylist_destroy(&args);
611  * ~~~~~~~~~~
612  *
613  * @param as The aerospike instance to use for this operation.
614  * @param err The as_error to be populated if an error occurs.
615  * @param policy The policy to use for this operation. If NULL, then the default policy will be used.
616  * @param key The key of the record.
617  * @param module The module containing the function to execute.
618  * @param function The function to execute.
619  * @param arglist The arguments for the function.
620  * @param listener User function to be called with command results.
621  * @param udata User data to be forwarded to user callback.
622  * @param event_loop Event loop assigned to run this command. If NULL, an event loop will be chosen by round-robin.
623  * @param pipe_listener Enables command pipelining, if not NULL. The given callback is invoked after the current command
624  * has been sent to the server. This allows for issuing the next command even before receiving a
625  * result for the current command.
626  *
627  * @return AEROSPIKE_OK if async command successfully queued. Otherwise an error.
628  *
629  * @ingroup key_operations
630  */
633  aerospike* as, as_error* err, const as_policy_apply* policy, const as_key* key,
634  const char* module, const char* function, as_list* arglist,
635  as_async_value_listener listener, void* udata, as_event_loop* event_loop,
636  as_pipe_listener pipe_listener
637  );
638 
639 /**
640  * @cond SKIP_DOXYGEN
641  * doxygen skips this section till endcond
642  */
644 aerospike_key_put_async_ex(
645  aerospike* as, as_error* err, const as_policy_write* policy, const as_key* key, as_record* rec,
646  as_async_write_listener listener, void* udata, as_event_loop* event_loop, as_pipe_listener pipe_listener,
647  size_t* length, size_t* comp_length
648  );
649 
651 aerospike_key_remove_async_ex(
652  aerospike* as, as_error* err, const as_policy_remove* policy, const as_key* key,
653  as_async_write_listener listener, void* udata, as_event_loop* event_loop,
654  as_pipe_listener pipe_listener, size_t* length
655  );
656 /**
657  * @endcond
658  */
659 
660 #ifdef __cplusplus
661 } // end extern "C"
662 #endif
AS_EXTERN as_status aerospike_key_put_async(aerospike *as, as_error *err, const as_policy_write *policy, const as_key *key, as_record *rec, as_async_write_listener listener, void *udata, as_event_loop *event_loop, as_pipe_listener pipe_listener)
AS_EXTERN as_status aerospike_key_get_async(aerospike *as, as_error *err, const as_policy_read *policy, const as_key *key, as_async_record_listener listener, void *udata, as_event_loop *event_loop, as_pipe_listener pipe_listener)
void(* as_async_value_listener)(as_error *err, as_val *val, void *udata, as_event_loop *event_loop)
Definition: as_listener.h:61
AS_EXTERN as_status aerospike_key_get(aerospike *as, as_error *err, const as_policy_read *policy, const as_key *key, as_record **rec)
as_status
Definition: as_status.h:30
void(* as_async_record_listener)(as_error *err, as_record *record, void *udata, as_event_loop *event_loop)
Definition: as_listener.h:48
AS_EXTERN as_status aerospike_key_select(aerospike *as, as_error *err, const as_policy_read *policy, const as_key *key, const char *bins[], as_record **rec)
Definition: as_val.h:61
#define AS_EXTERN
Definition: as_std.h:25
AS_EXTERN as_status aerospike_key_apply(aerospike *as, as_error *err, const as_policy_apply *policy, const as_key *key, const char *module, const char *function, as_list *arglist, as_val **result)
AS_EXTERN as_status aerospike_key_select_async(aerospike *as, as_error *err, const as_policy_read *policy, const as_key *key, const char *bins[], as_async_record_listener listener, void *udata, as_event_loop *event_loop, as_pipe_listener pipe_listener)
void(* as_async_write_listener)(as_error *err, void *udata, as_event_loop *event_loop)
Definition: as_listener.h:36
void(* as_pipe_listener)(void *udata, as_event_loop *event_loop)
Definition: as_listener.h:72
AS_EXTERN as_status aerospike_key_remove(aerospike *as, as_error *err, const as_policy_remove *policy, const as_key *key)
AS_EXTERN as_status aerospike_key_put(aerospike *as, as_error *err, const as_policy_write *policy, const as_key *key, as_record *rec)
AS_EXTERN as_status aerospike_key_operate_async(aerospike *as, as_error *err, const as_policy_operate *policy, const as_key *key, const as_operations *ops, as_async_record_listener listener, void *udata, as_event_loop *event_loop, as_pipe_listener pipe_listener)
AS_EXTERN as_status aerospike_key_exists_async(aerospike *as, as_error *err, const as_policy_read *policy, const as_key *key, as_async_record_listener listener, void *udata, as_event_loop *event_loop, as_pipe_listener pipe_listener)
AS_EXTERN as_status aerospike_key_exists(aerospike *as, as_error *err, const as_policy_read *policy, const as_key *key, as_record **rec)
AS_EXTERN as_status aerospike_key_apply_async(aerospike *as, as_error *err, const as_policy_apply *policy, const as_key *key, const char *module, const char *function, as_list *arglist, as_async_value_listener listener, void *udata, as_event_loop *event_loop, as_pipe_listener pipe_listener)
Definition: as_key.h:196
AS_EXTERN as_status aerospike_key_operate(aerospike *as, as_error *err, const as_policy_operate *policy, const as_key *key, const as_operations *ops, as_record **rec)
AS_EXTERN as_status aerospike_key_remove_async(aerospike *as, as_error *err, const as_policy_remove *policy, const as_key *key, as_async_write_listener listener, void *udata, as_event_loop *event_loop, as_pipe_listener pipe_listener)