All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
as_operations.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008-2016 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 #include <stdbool.h>
20 #include <stdint.h>
21 #include <aerospike/as_bin.h>
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 /******************************************************************************
28  * TYPES
29  *****************************************************************************/
30 
31 typedef enum as_cdt_paramtype_e {
32 
37 
40 
42 
43 typedef enum as_cdt_optype_e {
44 
45  // ------------------------------------------------------------------------
46  // List Operation
47 
48  // Add to list
53 
54  // Remove from list
59 
60  // Other list modifies
65 
66  // Read from list
70 
71  // ------------------------------------------------------------------------
72  // Map Operation
73 
74  // Adding <key, value> to the Map
77 
78  // Op by key
86 
87  // Misc
93 
95 
96 /**
97  * Operation Identifiers
98  */
99 typedef enum as_operator_e {
100 
101  /**
102  * Return the bin from the cluster.
103  */
105 
106  /**
107  * Update the bin.
108  */
110 
113 
114  /**
115  * Increment a bin containing an
116  * integer value.
117  */
119 
120  /**
121  * Append bytes to the bin containing
122  * either a string or blob.
123  */
125 
126  /**
127  * Prepend bytes to the bin containing
128  * either a string or blob.
129  */
131 
132  /**
133  * Touch the record's ttl.
134  */
136 
137 } as_operator;
138 
139 /**
140  * Operation on a bin.
141  * The value for the bin will be applied according to the operation.
142  */
143 typedef struct as_binop_s {
144 
145  /**
146  * The operation to be performed on the bin.
147  */
149 
150  /**
151  * The bin the operation will be performed on.
152  */
154 
155 } as_binop;
156 
157 /**
158  * Sequence of operations.
159  *
160  * ~~~~~~~~~~{.c}
161  * as_operations ops;
162  * as_operations_inita(&ops, 2);
163  * as_operations_add_incr(&ops, "bin1", 123);
164  * as_operations_add_append_str(&ops, "bin2", "abc");
165  * ...
166  * as_operations_destroy(&ops);
167  * ~~~~~~~~~~
168  *
169  */
170 typedef struct as_binops_s {
171 
172  /**
173  * @private
174  * If true, then as_binops_destroy() will free the entries.
175  */
176  bool _free;
177 
178  /**
179  * Number of entries allocated
180  */
181  uint16_t capacity;
182 
183  /**
184  * Number of entries used
185  */
186  uint16_t size;
187 
188  /**
189  * Sequence of entries
190  */
192 
193 } as_binops;
194 
195 /**
196  * The `aerospike_key_operate()` function provides the ability to execute
197  * multiple operations on a record in the database as a single atomic
198  * transaction.
199  *
200  * The `as_operations` object is used to define the operations to be performed
201  * on the record.
202  *
203  * ## Initialization
204  *
205  * Before using as_operations, you must first initialize it via either:
206  * - as_operations_inita()
207  * - as_operations_init()
208  * - as_operations_new()
209  *
210  * as_operations_inita() is a macro that initializes a stack allocated
211  * as_operations and allocates an internal array of operations. The macro
212  * accepts a pointer to the stack allocated as_operations and the number of
213  * operations to be added.
214  *
215  * ~~~~~~~~~~{.c}
216  * as_operations ops;
217  * as_operations_inita(&ops, 2);
218  * ~~~~~~~~~~
219  *
220  * as_operations_init() is a function that initializes a stack allocated
221  * as_operations. It differes from as_operations_inita() in that it allocates
222  * the internal array of operations on the heap. It accepts a pointer to the
223  * stack allocated as_operations and the number of operations to be added.
224  *
225  * ~~~~~~~~~~{.c}
226  * as_operations ops;
227  * as_operations_init(&ops, 2);
228  * ~~~~~~~~~~
229  *
230  * as_operations_new() is a function that will allocate a new as_operations
231  * on the heap. It will also allocate the internal array of operation on the
232  * heap.
233  *
234  * ~~~~~~~~~~{.c}
235  * as_operations * ops = as_operations_new(2);
236  * ~~~~~~~~~~
237  *
238  * When you no longer needthe as_operations, you can release the resources
239  * allocated to it via as_operations_destroy().
240  *
241  * ## Destruction
242  *
243  * When you no longer require an as_operations, you should call
244  * `as_operations_destroy()` to release it and associated resources.
245  *
246  * ~~~~~~~~~~{.c}
247  * as_operations_destroy(ops);
248  * ~~~~~~~~~~
249  *
250  * ## Usage
251  *
252  * as_operations is a sequence of operations to be applied to a record.
253  *
254  * Each of the following operations is added to the end of the sequence
255  * of operations.
256  *
257  * When you have compiled the sequence of operations you want to execute,
258  * then you will send it to aerospike_key_operate().
259  *
260  *
261  * ### Modifying a String
262  *
263  * Aerospike allows you to append a string to a bin containing
264  * a string.
265  *
266  * The following appends a "abc" to bin "bin1".
267  *
268  * ~~~~~~~~~~{.c}
269  * as_operations_add_append_str(ops, "bin1", "abc");
270  * ~~~~~~~~~~
271  *
272  * There is also a prepend operation, which will add the string
273  * to the beginning of the bin's current value.
274  *
275  * ~~~~~~~~~~{.c}
276  * as_operations_add_prepend_str(ops, "bin1", "abc");
277  * ~~~~~~~~~~
278  *
279  * ### Modifying a Byte Array
280  *
281  * Aerospike allows you to append a byte array to a bin containing
282  * a byte array.
283  *
284  * The following appends a 4 byte sequence to bin "bin1".
285  *
286  * ~~~~~~~~~~{.c}
287  * uint8_t raw[4] = { 1, 2, 3, 4 };
288  * as_operations_add_append_raw(ops, "bin1", raw, 4);
289  * ~~~~~~~~~~
290  *
291  * There is also a prepend operation, which will add the bytes
292  * to the beginning of the bin's current value.
293  *
294  * ~~~~~~~~~~{.c}
295  * uint8_t raw[4] = { 1, 2, 3, 4 };
296  * as_operations_add_prepend_raw(ops, "bin1", raw, 4);
297  * ~~~~~~~~~~
298  *
299  * ### Increment an Integer
300  *
301  * Aerospike allows you to increment the value of a bin
302  *
303  * The following increments the value in bin "bin1" by 4.
304  *
305  * ~~~~~~~~~~{.c}
306  * as_operations_add_incr(ops, "bin1", 4);
307  * ~~~~~~~~~~
308  *
309  * ### Write a Value
310  *
311  * Write a value into a bin. Overwriting previous value.
312  *
313  * The following writes a string "xyz" to "bin1".
314  *
315  * ~~~~~~~~~~{.c}
316  * as_operations_add_write_str(ops, "bin1", "xyz");
317  * ~~~~~~~~~~
318  *
319  * ### Read a Value
320  *
321  * Read a value from a bin. This is ideal, if you performed an
322  * operation on a bin, and want to read the new value.
323  *
324  * The following reads the value of "bin1"
325  *
326  * ~~~~~~~~~~{.c}
327  * as_operations_add_read(ops, "bin1", "xyz");
328  * ~~~~~~~~~~
329  *
330  * ### Touch a Record
331  *
332  * Touching a record will refresh its ttl and increment the generation
333  * of the record.
334  *
335  * The following touches a record.
336  *
337  * ~~~~~~~~~~{.c}
338  * as_operations_add_touch(ops);
339  * ~~~~~~~~~~
340  *
341  * @ingroup client_objects
342  */
343 typedef struct as_operations_s {
344 
345  /**
346  * @private
347  * If true, then as_operations_destroy() will free this instance.
348  */
349  bool _free;
350 
351  /**
352  * The generation of the record.
353  */
354  uint16_t gen;
355 
356  /**
357  * The time-to-live (expiration) of the record in seconds.
358  */
359  uint32_t ttl;
360 
361  /**
362  * Operations to be performed on the bins of a record.
363  */
365 
366 } as_operations;
367 
368 /******************************************************************************
369  * MACROS
370  *****************************************************************************/
371 
372 /**
373  * Initializes a stack allocated `as_operations` (as_operations) and allocates
374  * `__nops` number of entries on the stack.
375  *
376  * ~~~~~~~~~~{.c}
377  * as_operations ops;
378  * as_operations_inita(&ops, 2);
379  * as_operations_add_incr(&ops, "bin1", 123);
380  * as_operations_add_append_str(&ops, "bin2", "abc");
381  * ~~~~~~~~~~
382  *
383  * @param __ops The `as_operations *` to initialize.
384  * @param __nops The number of `as_binops.entries` to allocate on the
385  * stack.
386  *
387  * @relates as_operations
388  * @ingroup as_operations_object
389  */
390 #define as_operations_inita(__ops, __nops) \
391  (__ops)->_free = false;\
392  (__ops)->gen = 0;\
393  (__ops)->ttl = 0;\
394  (__ops)->binops._free = false;\
395  (__ops)->binops.capacity = __nops;\
396  (__ops)->binops.size = 0;\
397  (__ops)->binops.entries = (as_binop *) alloca(sizeof(as_binop) * __nops);
398 
399 /******************************************************************************
400  * FUNCTIONS
401  *****************************************************************************/
402 
403 /**
404  * Intializes a stack allocated `as_operations`.
405  *
406  * ~~~~~~~~~~{.c}
407  * as_operations ops;
408  * as_operations_init(&ops, 2);
409  * as_operations_add_incr(&ops, "bin1", 123);
410  * as_operations_add_append_str(&ops, "bin2", "abc");
411  * ~~~~~~~~~~
412  *
413  * Use `as_operations_destroy()` to free the resources allocated to the
414  * `as_operations`.
415  *
416  * @param ops The `as_operations` to initialize.
417  * @param nops The number of `as_operations.binops.entries` to allocate on the heap.
418  *
419  * @return The initialized `as_operations` on success. Otherwise NULL.
420  *
421  * @relates as_operations
422  * @ingroup as_operations_object
423  */
424 as_operations * as_operations_init(as_operations * ops, uint16_t nops);
425 
426 /**
427  * Create and initialize a heap allocated `as_operations`.
428  *
429  * ~~~~~~~~~~{.c}
430  * as_operations ops = as_operations_new(2);
431  * as_operations_add_incr(ops, "bin1", 123);
432  * as_operations_add_append_str(ops, "bin2", "abc");
433  * ~~~~~~~~~~
434  *
435  * Use `as_operations_destroy()` to free the resources allocated to the
436  * `as_operations`.
437  *
438  * @param nops The number of `as_operations.binops.entries` to allocate on the heap.
439  *
440  * @return The new `as_operations` on success. Otherwise NULL.
441  *
442  * @relates as_operations
443  * @ingroup as_operations_object
444  */
445 as_operations * as_operations_new(uint16_t nops);
446 
447 /**
448  * Destroy an `as_operations` and release associated resources.
449  *
450  * ~~~~~~~~~~{.c}
451  * as_operations_destroy(binops);
452  * ~~~~~~~~~~
453  *
454  * @param ops The `as_operations` to destroy.
455  *
456  * @relates as_operations
457  * @ingroup as_operations_object
458  */
460 
461 /**
462  * Add a `AS_OPERATOR_WRITE` bin operation.
463  *
464  * @param ops The `as_operations` to append the operation to.
465  * @param name The name of the bin to perform the operation on.
466  * @param value The value to be used in the operation.
467  *
468  * @return true on success. Otherwise an error occurred.
469  *
470  * @relates as_operations
471  * @ingroup as_operations_object
472  */
473 bool as_operations_add_write(as_operations * ops, const as_bin_name name, as_bin_value * value);
474 
475 /**
476  * Add a `AS_OPERATOR_WRITE` bin operation with an int64_t value.
477  *
478  * @param ops The `as_operations` to append the operation to.
479  * @param name The name of the bin to perform the operation on.
480  * @param value The value to be used in the operation.
481  *
482  * @return true on success. Otherwise an error occurred.
483  *
484  * @relates as_operations
485  * @ingroup as_operations_object
486  */
487 bool as_operations_add_write_int64(as_operations * ops, const as_bin_name name, int64_t value);
488 
489 /**
490  * Add a `AS_OPERATOR_WRITE` bin operation with a double value.
491  *
492  * @param ops The `as_operations` to append the operation to.
493  * @param name The name of the bin to perform the operation on.
494  * @param value The value to be used in the operation.
495  *
496  * @return true on success. Otherwise an error occurred.
497  *
498  * @relates as_operations
499  * @ingroup as_operations_object
500  */
501 bool as_operations_add_write_double(as_operations * ops, const as_bin_name name, double value);
502 
503 /**
504  * Add a `AS_OPERATOR_WRITE` bin operation with a NULL-terminated string value.
505  *
506  * @param ops The `as_operations` to append the operation to.
507  * @param name The name of the bin to perform the operation on.
508  * @param value The value to be used in the operation.
509  * @param free If true, then the value will be freed when the operations is destroyed.
510  *
511  * @return true on success. Otherwise an error occurred.
512  *
513  * @relates as_operations
514  * @ingroup as_operations_object
515  */
516 bool as_operations_add_write_strp(as_operations * ops, const as_bin_name name, const char * value, bool free);
517 
518 /**
519  * Add a `AS_OPERATOR_WRITE` bin operation with a NULL-terminated string value.
520  *
521  * @param ops The `as_operations` to append the operation to.
522  * @param name The name of the bin to perform the operation on.
523  * @param value The value to be used in the operation. Must last for the lifetime of the operations.
524  *
525  * @return true on success. Otherwise an error occurred.
526  *
527  * @relates as_operations
528  * @ingroup as_operations_object
529  */
530 static inline bool as_operations_add_write_str(as_operations * ops, const as_bin_name name, const char * value)
531 {
532  return as_operations_add_write_strp(ops, name, value, false);
533 }
534 
535 /**
536  * Add a `AS_OPERATOR_WRITE` bin operation with a NULL-terminated GeoJSON string value.
537  *
538  * @param ops The `as_operations` to append the operation to.
539  * @param name The name of the bin to perform the operation on.
540  * @param value The value to be used in the operation.
541  * @param free If true, then the value will be freed when the operations is destroyed.
542  *
543  * @return true on success. Otherwise an error occurred.
544  *
545  * @relates as_operations
546  * @ingroup as_operations_object
547  */
548 bool as_operations_add_write_geojson_strp(as_operations * ops, const as_bin_name name, const char * value, bool free);
549 
550 /**
551  * Add a `AS_OPERATOR_WRITE` bin operation with a NULL-terminated GeoJSON string value.
552  *
553  * @param ops The `as_operations` to append the operation to.
554  * @param name The name of the bin to perform the operation on.
555  * @param value The value to be used in the operation. Must last for the lifetime of the operations.
556  *
557  * @return true on success. Otherwise an error occurred.
558  *
559  * @relates as_operations
560  * @ingroup as_operations_object
561  */
562 static inline bool as_operations_add_write_geojson_str(as_operations * ops, const as_bin_name name, const char * value)
563 {
564  return as_operations_add_write_geojson_strp(ops, name, value, false);
565 }
566 
567 /**
568  * Add a `AS_OPERATOR_WRITE` bin operation with a raw bytes value.
569  *
570  * @param ops The `as_operations` to append the operation to.
571  * @param name The name of the bin to perform the operation on.
572  * @param value The value to be used in the operation.
573  * @param size The size of the value.
574  * @param free If true, then the value will be freed when the operations is destroyed.
575  *
576  * @return true on success. Otherwise an error occurred.
577  *
578  * @relates as_operations
579  * @ingroup as_operations_object
580  */
581 bool as_operations_add_write_rawp(as_operations * ops, const as_bin_name name, const uint8_t * value, uint32_t size, bool free);
582 
583 /**
584  * Add a `AS_OPERATOR_WRITE` bin operation with a raw bytes value.
585  *
586  * @param ops The `as_operations` to append the operation to.
587  * @param name The name of the bin to perform the operation on.
588  * @param value The value to be used in the operation.
589  * @param size The size of the value. Must last for the lifetime of the operations.
590  *
591  * @return true on success. Otherwise an error occurred.
592  *
593  * @relates as_operations
594  * @ingroup as_operations_object
595  */
596 static inline bool as_operations_add_write_raw(as_operations * ops, const as_bin_name name, const uint8_t * value, uint32_t size)
597 {
598  return as_operations_add_write_rawp(ops, name, value, size, false);
599 }
600 
601 /**
602  * Add a `AS_OPERATOR_READ` bin operation.
603  *
604  * @param ops The `as_operations` to append the operation to.
605  * @param name The name of the bin to perform the operation on.
606  *
607  * @return true on success. Otherwise an error occurred.
608  *
609  * @relates as_operations
610  * @ingroup as_operations_object
611  */
612 bool as_operations_add_read(as_operations * ops, const as_bin_name name);
613 
614 /**
615  * Add a `AS_OPERATOR_INCR` bin operation with (required) int64_t value.
616  *
617  * @param ops The `as_operations` to append the operation to.
618  * @param name The name of the bin to perform the operation on.
619  * @param value The value to be used in the operation.
620  *
621  * @return true on success. Otherwise an error occurred.
622  *
623  * @relates as_operations
624  * @ingroup as_operations_object
625  */
626 bool as_operations_add_incr(as_operations * ops, const as_bin_name name, int64_t value);
627 
628 /**
629  * Add a `AS_OPERATOR_INCR` bin operation with double value.
630  *
631  * @param ops The `as_operations` to append the operation to.
632  * @param name The name of the bin to perform the operation on.
633  * @param value The value to be used in the operation.
634  *
635  * @return true on success. Otherwise an error occurred.
636  *
637  * @relates as_operations
638  * @ingroup as_operations_object
639  */
640 bool as_operations_add_incr_double(as_operations * ops, const as_bin_name name, double value);
641 
642 /**
643  * Add a `AS_OPERATOR_PREPEND` bin operation with a NULL-terminated string value.
644  *
645  * @param ops The `as_operations` to append the operation to.
646  * @param name The name of the bin to perform the operation on.
647  * @param value The value to be used in the operation.
648  * @param free If true, then the value will be freed when the operations is destroyed.
649  *
650  * @return true on success. Otherwise an error occurred.
651  *
652  * @relates as_operations
653  * @ingroup as_operations_object
654  */
655 bool as_operations_add_prepend_strp(as_operations * ops, const as_bin_name name, const char * value, bool free);
656 
657 /**
658  * Add a `AS_OPERATOR_PREPEND` bin operation with a NULL-terminated string value.
659  *
660  * @param ops The `as_operations` to append the operation to.
661  * @param name The name of the bin to perform the operation on.
662  * @param value The value to be used in the operation. Must last for the lifetime of the operations.
663  *
664  * @return true on success. Otherwise an error occurred.
665  *
666  * @relates as_operations
667  * @ingroup as_operations_object
668  */
669 static inline bool as_operations_add_prepend_str(as_operations * ops, const as_bin_name name, const char * value)
670 {
671  return as_operations_add_prepend_strp(ops, name, value, false);
672 }
673 
674 /**
675  * Add a `AS_OPERATOR_PREPEND` bin operation with a raw bytes value.
676  *
677  * @param ops The `as_operations` to append the operation to.
678  * @param name The name of the bin to perform the operation on.
679  * @param value The value to be used in the operation.
680  * @param size The size of the value.
681  * @param free If true, then the value will be freed when the operations is destroyed.
682  *
683  * @return true on success. Otherwise an error occurred.
684  *
685  * @relates as_operations
686  * @ingroup as_operations_object
687  */
688 bool as_operations_add_prepend_rawp(as_operations * ops, const as_bin_name name, const uint8_t * value, uint32_t size, bool free);
689 
690 /**
691  * Add a `AS_OPERATOR_PREPEND` bin operation with a raw bytes value.
692  *
693  * @param ops The `as_operations` to append the operation to.
694  * @param name The name of the bin to perform the operation on.
695  * @param value The value to be used in the operation. Must last for the lifetime of the operations.
696  * @param size The size of the value.
697  *
698  * @return true on success. Otherwise an error occurred.
699  *
700  * @relates as_operations
701  * @ingroup as_operations_object
702  */
703 static inline bool as_operations_add_prepend_raw(as_operations * ops, const as_bin_name name, const uint8_t * value, uint32_t size)
704 {
705  return as_operations_add_prepend_rawp(ops, name, value, size, false);
706 }
707 
708 /**
709  * Add a `AS_OPERATOR_APPEND` bin operation with a NULL-terminated string value.
710  *
711  * @param ops The `as_operations` to append the operation to.
712  * @param name The name of the bin to perform the operation on.
713  * @param value The value to be used in the operation.
714  * @param free If true, then the value will be freed when the operations is destroyed.
715  *
716  * @return true on success. Otherwise an error occurred.
717  *
718  * @relates as_operations
719  * @ingroup as_operations_object
720  */
721 bool as_operations_add_append_strp(as_operations * ops, const as_bin_name name, const char * value, bool free);
722 
723 /**
724  * Add a `AS_OPERATOR_APPEND` bin operation with a NULL-terminated string value.
725  *
726  * @param ops The `as_operations` to append the operation to.
727  * @param name The name of the bin to perform the operation on.
728  * @param value The value to be used in the operation. Must last for the lifetime of the operations.
729  *
730  * @return true on success. Otherwise an error occurred.
731  *
732  * @relates as_operations
733  * @ingroup as_operations_object
734  */
735 static inline bool as_operations_add_append_str(as_operations * ops, const as_bin_name name, const char * value)
736 {
737  return as_operations_add_append_strp(ops, name, value, false);
738 }
739 
740 /**
741  * Add a `AS_OPERATOR_APPEND` bin operation with a raw bytes value.
742  *
743  * @param ops The `as_operations` to append the operation to.
744  * @param name The name of the bin to perform the operation on.
745  * @param value The value to be used in the operation.
746  * @param size The size of the value.
747  * @param free If true, then the value will be freed when the operations is destroyed.
748  *
749  * @return true on success. Otherwise an error occurred.
750  *
751  * @relates as_operations
752  * @ingroup as_operations_object
753  */
754 bool as_operations_add_append_rawp(as_operations * ops, const as_bin_name name, const uint8_t * value, uint32_t size, bool free);
755 
756 /**
757  * Add a `AS_OPERATOR_APPEND` bin operation with a raw bytes value.
758  *
759  * @param ops The `as_operations` to append the operation to.
760  * @param name The name of the bin to perform the operation on.
761  * @param value The value to be used in the operation. Must last for the lifetime of the operations.
762  * @param size The size of the value.
763  *
764  * @return true on success. Otherwise an error occurred.
765  *
766  * @relates as_operations
767  * @ingroup as_operations_object
768  */
769 static inline bool as_operations_add_append_raw(as_operations * ops, const as_bin_name name, const uint8_t * value, uint32_t size)
770 {
771  return as_operations_add_append_rawp(ops, name, value, size, false);
772 }
773 
774 /**
775  * Add a `AS_OPERATOR_TOUCH` record operation.
776  *
777  * @param ops The `as_operations` to append the operation to.
778  *
779  * @return true on success. Otherwise an error occurred.
780  *
781  * @relates as_operations
782  * @ingroup as_operations_object
783  */
785 
786 /******************************************************************************
787  * CDT FUNCTIONS
788  *****************************************************************************/
789 
790 /**
791  * Add an as_val element to end of list.
792  *
793  * @param ops The `as_operations` to append the operation to.
794  * @param name The name of the bin to perform the operation on.
795  * @param val Value to append. Consumes a reference of this as_val.
796  *
797  * @return true on success. Otherwise an error occurred.
798  *
799  * @relates as_operations
800  * @ingroup as_operations_object
801  */
803 
804 /**
805  * Add an integer to end of list. Convenience function of as_operations_add_list_append()
806  *
807  * @param ops The `as_operations` to append the operation to.
808  * @param name The name of the bin to perform the operation on.
809  * @param value An integer value.
810  *
811  * @return true on success. Otherwise an error occurred.
812  *
813  * @relates as_operations
814  * @ingroup as_operations_object
815  */
816 bool as_operations_add_list_append_int64(as_operations *ops, const as_bin_name name, int64_t value);
817 
818 /**
819  * Add a double to end of list. Convenience function of as_operations_add_list_append()
820  *
821  * @param ops The `as_operations` to append the operation to.
822  * @param name The name of the bin to perform the operation on.
823  * @param value A double value.
824  *
825  * @return true on success. Otherwise an error occurred.
826  *
827  * @relates as_operations
828  * @ingroup as_operations_object
829  */
830 bool as_operations_add_list_append_double(as_operations *ops, const as_bin_name name, double value);
831 
832 /**
833  * Add a string to end of list. Convenience function of as_operations_add_list_append()
834  *
835  * @param ops The `as_operations` to append the operation to.
836  * @param name The name of the bin to perform the operation on.
837  * @param value A c-string.
838  * @param free If true, then the value will be freed when the operations is destroyed.
839  *
840  * @return true on success. Otherwise an error occurred.
841  *
842  * @relates as_operations
843  * @ingroup as_operations_object
844  */
845 bool as_operations_add_list_append_strp(as_operations *ops, const as_bin_name name, const char *value, bool free);
846 
847 /**
848  * Add a string to end of list. Convenience function of as_operations_add_list_append()
849  *
850  * @param ops The `as_operations` to append the operation to.
851  * @param name The name of the bin to perform the operation on.
852  * @param value A c-string.
853  *
854  * @return true on success. Otherwise an error occurred.
855  *
856  * @relates as_operations
857  * @ingroup as_operations_object
858  */
859 static inline bool as_operations_add_list_append_str(as_operations *ops, const as_bin_name name, const char *value)
860 {
861  return as_operations_add_list_append_strp(ops, name, value, false);
862 }
863 
864 /**
865  * Add a blob to end of list. Convenience function of as_operations_add_list_append()
866  *
867  * @param ops The `as_operations` to append the operation to.
868  * @param name The name of the bin to perform the operation on.
869  * @param value A blob.
870  * @param size Size of the blob.
871  * @param free If true, then the value will be freed when the operations is destroyed.
872  *
873  * @return true on success. Otherwise an error occurred.
874  *
875  * @relates as_operations
876  * @ingroup as_operations_object
877  */
878 bool as_operations_add_list_append_rawp(as_operations *ops, const as_bin_name name, const uint8_t *value, uint32_t size, bool free);
879 
880 /**
881  * Add a blob to end of list. Convenience function of as_operations_add_list_append()
882  *
883  * @param ops The `as_operations` to append the operation to.
884  * @param name The name of the bin to perform the operation on.
885  * @param value A blob.
886  * @param size Size of the blob.
887  *
888  * @return true on success. Otherwise an error occurred.
889  *
890  * @relates as_operations
891  * @ingroup as_operations_object
892  */
893 static inline bool as_operations_add_list_append_raw(as_operations *ops, const as_bin_name name, const uint8_t *value, uint32_t size)
894 {
895  return as_operations_add_list_append_rawp(ops, name, value, size, false);
896 }
897 
898 /**
899  * Add multiple values to end of list.
900  *
901  * @param ops The `as_operations` to append the operation to.
902  * @param name The name of the bin to perform the operation on.
903  * @param list List of values to append. Consumes a reference of this as_list.
904  *
905  * @return true on success. Otherwise an error occurred.
906  *
907  * @relates as_operations
908  * @ingroup as_operations_object
909  */
910 
912 
913 /**
914  * Insert an as_val element to list at index position.
915  *
916  * @param ops The `as_operations` to append the operation to.
917  * @param name The name of the bin to perform the operation on.
918  * @param index Index position which the as_val will be inserted at. Negative index counts from end of list.
919  * @param val Value to insert. Consumes a reference of this as_list.
920  *
921  * @return true on success. Otherwise an error occurred.
922  *
923  * @relates as_operations
924  * @ingroup as_operations_object
925  */
926 bool as_operations_add_list_insert(as_operations *ops, const as_bin_name name, int64_t index, as_val *val);
927 
928 /**
929  * Insert integer to list at index position. Convenience function of as_operations_add_list_insert()
930  *
931  * @param ops The `as_operations` to append the operation to.
932  * @param name The name of the bin to perform the operation on.
933  * @param index Index position which the integer will be inserted at. Negative index counts from end of list.
934  * @param value An integer value.
935  *
936  * @return true on success. Otherwise an error occurred.
937  *
938  * @relates as_operations
939  * @ingroup as_operations_object
940  */
941 bool as_operations_add_list_insert_int64(as_operations *ops, const as_bin_name name, int64_t index, int64_t value);
942 
943 /**
944  * Insert double to list at index position. Convenience function of as_operations_add_list_insert()
945  *
946  * @param ops The `as_operations` to append the operation to.
947  * @param name The name of the bin to perform the operation on.
948  * @param index Index position which the double will be inserted at. Negative index counts from end of list.
949  * @param value A double value.
950  *
951  * @return true on success. Otherwise an error occurred.
952  *
953  * @relates as_operations
954  * @ingroup as_operations_object
955  */
956 bool as_operations_add_list_insert_double(as_operations *ops, const as_bin_name name, int64_t index, double value);
957 
958 /**
959  * Insert string to list at index position. Convenience function of as_operations_add_list_insert()
960  *
961  * @param ops The `as_operations` to append the operation to.
962  * @param name The name of the bin to perform the operation on.
963  * @param index Index position which the string will be inserted at. Negative index counts from end of list.
964  * @param value A c-string.
965  * @param free If true, then the value will be freed when the operations is destroyed.
966  *
967  * @return true on success. Otherwise an error occurred.
968  *
969  * @relates as_operations
970  * @ingroup as_operations_object
971  */
972 bool as_operations_add_list_insert_strp(as_operations *ops, const as_bin_name name, int64_t index, const char *value, bool free);
973 
974 /**
975  * Insert string to list at index position. Convenience function of as_operations_add_list_insert()
976  *
977  * @param ops The `as_operations` to append the operation to.
978  * @param name The name of the bin to perform the operation on.
979  * @param index Index position which the string will be inserted at. Negative index counts from end of list.
980  * @param value A c-string.
981  *
982  * @return true on success. Otherwise an error occurred.
983  *
984  * @relates as_operations
985  * @ingroup as_operations_object
986  */
987 static inline bool as_operations_add_list_insert_str(as_operations *ops, const as_bin_name name, int64_t index, const char *value)
988 {
989  return as_operations_add_list_insert_strp(ops, name, index, value, false);
990 }
991 
992 /**
993  * Insert blob to list at index position. Convenience function of as_operations_add_list_insert()
994  *
995  * @param ops The `as_operations` to append the operation to.
996  * @param name The name of the bin to perform the operation on.
997  * @param index Index position which the blob will be inserted at. Negative index counts from end of list.
998  * @param value A blob.
999  * @param size Size of the blob.
1000  * @param free If true, then the value will be freed when the operations is destroyed.
1001  *
1002  * @return true on success. Otherwise an error occurred.
1003  *
1004  * @relates as_operations
1005  * @ingroup as_operations_object
1006  */
1007 bool as_operations_add_list_insert_rawp(as_operations *ops, const as_bin_name name, int64_t index, const uint8_t *value, uint32_t size, bool free);
1008 
1009 /**
1010  * Insert blob to list at index position. Convenience function of as_operations_add_list_insert()
1011  *
1012  * @param ops The `as_operations` to append the operation to.
1013  * @param name The name of the bin to perform the operation on.
1014  * @param index Index position which the blob will be inserted at. Negative index counts from end of list.
1015  * @param value A blob.
1016  * @param size Size of the blob.
1017  *
1018  * @return true on success. Otherwise an error occurred.
1019  *
1020  * @relates as_operations
1021  * @ingroup as_operations_object
1022  */
1023 static inline bool as_operations_add_list_insert_raw(as_operations *ops, const as_bin_name name, int64_t index, const uint8_t *value, uint32_t size)
1024 {
1025  return as_operations_add_list_insert_rawp(ops, name, index, value, size, false);
1026 }
1027 
1028 /**
1029  * Insert multiple values to list at index position.
1030  *
1031  * @param ops The `as_operations` to append the operation to.
1032  * @param name The name of the bin to perform the operation on.
1033  * @param index Index position which the blob will be inserted at. Negative index counts from end of list.
1034  * @param list List of values to insert. Consumes reference of list.
1035  *
1036  * @return true on success. Otherwise an error occurred.
1037  *
1038  * @relates as_operations
1039  * @ingroup as_operations_object
1040  */
1041 bool as_operations_add_list_insert_items(as_operations *ops, const as_bin_name name, int64_t index, as_list *list);
1042 
1043 /**
1044  * Remove and return a value at index.
1045  *
1046  * @param ops The `as_operations` to append the operation to.
1047  * @param name The name of the bin to perform the operation on.
1048  * @param index Index position at which the value will be removed and returned. Negative index counts from end of list.
1049  *
1050  * @return true on success. Otherwise an error occurred.
1051  *
1052  * @relates as_operations
1053  * @ingroup as_operations_object
1054  */
1055 bool as_operations_add_list_pop(as_operations *ops, const as_bin_name name, int64_t index);
1056 
1057 /**
1058  * Remove and return N values from index.
1059  *
1060  * @param ops The `as_operations` to append the operation to.
1061  * @param name The name of the bin to perform the operation on.
1062  * @param index Index position at which to start the removal. Negative index counts from end of list.
1063  * @param count Number of values to remove. If not enough values in list, will remove to list end.
1064  *
1065  * @return true on success. Otherwise an error occurred.
1066  *
1067  * @relates as_operations
1068  * @ingroup as_operations_object
1069  */
1070 bool as_operations_add_list_pop_range(as_operations *ops, const as_bin_name name, int64_t index, uint64_t count);
1071 
1072 /**
1073  * Remove and return all values from index to the end of list.
1074  *
1075  * @param ops The `as_operations` to append the operation to.
1076  * @param name The name of the bin to perform the operation on.
1077  * @param index Index position at which to start the removal. Negative index counts from end of list.
1078  *
1079  * @return true on success. Otherwise an error occurred.
1080  *
1081  * @relates as_operations
1082  * @ingroup as_operations_object
1083  */
1084 bool as_operations_add_list_pop_range_from(as_operations *ops, const as_bin_name name, int64_t index);
1085 
1086 /**
1087  * Remove value at index.
1088  *
1089  * @param ops The `as_operations` to append the operation to.
1090  * @param name The name of the bin to perform the operation on.
1091  * @param index Index position at which to start the removal. Negative index counts from end of list.
1092  *
1093  * @return true on success. Otherwise an error occurred.
1094  *
1095  * @relates as_operations
1096  * @ingroup as_operations_object
1097  */
1098 bool as_operations_add_list_remove(as_operations *ops, const as_bin_name name, int64_t index);
1099 
1100 /**
1101  * Remove N values from index.
1102  *
1103  * @param ops The `as_operations` to append the operation to.
1104  * @param name The name of the bin to perform the operation on.
1105  * @param index Index position at which to start the removal. Negative index counts from end of list.
1106  * @param count Number of values to remove. If not enough values in list, will remove to list end.
1107  *
1108  * @return true on success. Otherwise an error occurred.
1109  *
1110  * @relates as_operations
1111  * @ingroup as_operations_object
1112  */
1113 bool as_operations_add_list_remove_range(as_operations *ops, const as_bin_name name, int64_t index, uint64_t count);
1114 
1115 /**
1116  * Remove all values from index until end of list.
1117  *
1118  * @param ops The `as_operations` to append the operation to.
1119  * @param name The name of the bin to perform the operation on.
1120  * @param index Index position at which to start the removal. Negative index counts from end of list.
1121  *
1122  * @return true on success. Otherwise an error occurred.
1123  *
1124  * @relates as_operations
1125  * @ingroup as_operations_object
1126  */
1127 bool as_operations_add_list_remove_range_from(as_operations *ops, const as_bin_name name, int64_t index);
1128 
1129 //-----------------------------------------------------------------------------
1130 // Other list modifies
1131 
1132 /**
1133  * Remove all values. Will leave empty list in bin.
1134  *
1135  * @param ops The `as_operations` to append the operation to.
1136  * @param name The name of the bin to perform the operation on.
1137  *
1138  * @return true on success. Otherwise an error occurred.
1139  *
1140  * @relates as_operations
1141  * @ingroup as_operations_object
1142  */
1144 
1145 /**
1146  * Set an as_val element of the list at the index position.
1147  *
1148  * @param ops The `as_operations` to append the operation to.
1149  * @param name The name of the bin to perform the operation on.
1150  * @param index Index position to set. Negative index counts from end of list.
1151  * @param val Consumes a reference of this as_val.
1152  *
1153  * @return true on success. Otherwise an error occurred.
1154  *
1155  * @relates as_operations
1156  * @ingroup as_operations_object
1157  */
1158 bool as_operations_add_list_set(as_operations *ops, const as_bin_name name, int64_t index, as_val *val);
1159 
1160 /**
1161  * Set value at index as integer. Convenience function of as_operations_add_list_set()
1162  *
1163  * @param ops The `as_operations` to append the operation to.
1164  * @param name The name of the bin to perform the operation on.
1165  * @param index Index position to set. Negative index counts from end of list.
1166  * @param value An integer value.
1167  *
1168  * @return true on success. Otherwise an error occurred.
1169  *
1170  * @relates as_operations
1171  * @ingroup as_operations_object
1172  */
1173 bool as_operations_add_list_set_int64(as_operations *ops, const as_bin_name name, int64_t index, int64_t value);
1174 
1175 /**
1176  * Set value at index as double. Convenience function of as_operations_add_list_set()
1177  *
1178  * @param ops The `as_operations` to append the operation to.
1179  * @param name The name of the bin to perform the operation on.
1180  * @param index Index position to set. Negative index counts from end of list.
1181  * @param value A double value.
1182  *
1183  * @return true on success. Otherwise an error occurred.
1184  *
1185  * @relates as_operations
1186  * @ingroup as_operations_object
1187  */
1188 bool as_operations_add_list_set_double(as_operations *ops, const as_bin_name name, int64_t index, double value);
1189 
1190 /**
1191  * Set value at index as string. Convenience function of as_operations_add_list_set()
1192  *
1193  * @param ops The `as_operations` to append the operation to.
1194  * @param name The name of the bin to perform the operation on.
1195  * @param index Index position to set. Negative index counts from end of list.
1196  * @param value A c-string.
1197  * @param free If true, then the value will be freed when the operations is destroyed.
1198  *
1199  * @return true on success. Otherwise an error occurred.
1200  *
1201  * @relates as_operations
1202  * @ingroup as_operations_object
1203  */
1204 bool as_operations_add_list_set_strp(as_operations *ops, const as_bin_name name, int64_t index, const char *value, bool free);
1205 
1206 /**
1207  * Set value at index as string. Convenience function of as_operations_add_list_set()
1208  *
1209  * @param ops The `as_operations` to append the operation to.
1210  * @param name The name of the bin to perform the operation on.
1211  * @param index Index position to set. Negative index counts from end of list.
1212  * @param value A c-string.
1213  *
1214  * @return true on success. Otherwise an error occurred.
1215  *
1216  * @relates as_operations
1217  * @ingroup as_operations_object
1218  */
1219 static inline bool as_operations_add_list_set_str(as_operations *ops, const as_bin_name name, int64_t index, const char *value)
1220 {
1221  return as_operations_add_list_set_strp(ops, name, index, value, false);
1222 }
1223 
1224 /**
1225  * Set value at index as blob. Convenience function of as_operations_add_list_set()
1226  *
1227  * @param ops The `as_operations` to append the operation to.
1228  * @param name The name of the bin to perform the operation on.
1229  * @param index Index position to set. Negative index counts from end of list.
1230  * @param value A blob.
1231  * @param size Size of the blob.
1232  * @param free If true, then the value will be freed when the operations is destroyed.
1233  *
1234  * @return true on success. Otherwise an error occurred.
1235  *
1236  * @relates as_operations
1237  * @ingroup as_operations_object
1238  */
1239 bool as_operations_add_list_set_rawp(as_operations *ops, const as_bin_name name, int64_t index, const uint8_t *value, uint32_t size, bool free);
1240 
1241 /**
1242  * Set value at index as blob. Convenience function of as_operations_add_list_set()
1243  *
1244  * @param ops The `as_operations` to append the operation to.
1245  * @param name The name of the bin to perform the operation on.
1246  * @param index Index position to set. Negative index counts from end of list.
1247  * @param value A blob.
1248  * @param size Size of the blob.
1249  *
1250  * @return true on success. Otherwise an error occurred.
1251  *
1252  * @relates as_operations
1253  * @ingroup as_operations_object
1254  */
1255 static inline bool as_operations_add_list_set_raw(as_operations *ops, const as_bin_name name, int64_t index, const uint8_t *value, uint32_t size)
1256 {
1257  return as_operations_add_list_set_rawp(ops, name, index, value, size, false);
1258 }
1259 
1260 /**
1261  * Remove values NOT within range(index, count).
1262  *
1263  * @param ops The `as_operations` to append the operation to.
1264  * @param name The name of the bin to perform the operation on.
1265  * @param index Values from 0-index position are removed. Negative index counts from end of list.
1266  * @param count Number of values to keep. All other values beyond count are removed.
1267  *
1268  * @return true on success. Otherwise an error occurred.
1269  *
1270  * @relates as_operations
1271  * @ingroup as_operations_object
1272  */
1273 bool as_operations_add_list_trim(as_operations *ops, const as_bin_name name, int64_t index, uint64_t count);
1274 
1275 //-----------------------------------------------------------------------------
1276 // Read operations
1277 
1278 /**
1279  * Get value of list at index.
1280  *
1281  * @param ops The `as_operations` to append the operation to.
1282  * @param name The name of the bin to perform the operation on.
1283  * @param index Index position to get. Negative index counts from end of list.
1284  *
1285  * @return true on success. Otherwise an error occurred.
1286  *
1287  * @relates as_operations
1288  * @ingroup as_operations_object
1289  */
1290 bool as_operations_add_list_get(as_operations *ops, const as_bin_name name, int64_t index);
1291 /**
1292  * Get multiple values of list starting at index.
1293  *
1294  * @param ops The `as_operations` to append the operation to.
1295  * @param name The name of the bin to perform the operation on.
1296  * @param index Index position at which to start. Negative index counts from end of list.
1297  * @param count Number of values to get. If not enough in list, will return all remaining.
1298  *
1299  * @return true on success. Otherwise an error occurred.
1300  *
1301  * @relates as_operations
1302  * @ingroup as_operations_object
1303  */
1304 bool as_operations_add_list_get_range(as_operations *ops, const as_bin_name name, int64_t index, uint64_t count);
1305 
1306 /**
1307  * Get multiple values of list starting at index until end of list.
1308  *
1309  * @param ops The `as_operations` to append the operation to.
1310  * @param name The name of the bin to perform the operation on.
1311  * @param index Index position at which to start. Negative index counts from end of list.
1312  *
1313  * @return true on success. Otherwise an error occurred.
1314  *
1315  * @relates as_operations
1316  * @ingroup as_operations_object
1317  */
1318 bool as_operations_add_list_get_range_from(as_operations *ops, const as_bin_name name, int64_t index);
1319 
1320 /**
1321  * Get number of values in list.
1322  *
1323  * @param ops The `as_operations` to append the operation to.
1324  * @param name The name of the bin to perform the operation on.
1325  *
1326  * @return true on success. Otherwise an error occurred.
1327  *
1328  * @relates as_operations
1329  * @ingroup as_operations_object
1330  */
1332 
1333 #ifdef __cplusplus
1334 } // end extern "C"
1335 #endif
bool as_operations_add_append_rawp(as_operations *ops, const as_bin_name name, const uint8_t *value, uint32_t size, bool free)
bool as_operations_add_write_int64(as_operations *ops, const as_bin_name name, int64_t value)
static bool as_operations_add_prepend_raw(as_operations *ops, const as_bin_name name, const uint8_t *value, uint32_t size)
bool as_operations_add_list_set_int64(as_operations *ops, const as_bin_name name, int64_t index, int64_t value)
bool as_operations_add_list_remove(as_operations *ops, const as_bin_name name, int64_t index)
bool as_operations_add_list_append_rawp(as_operations *ops, const as_bin_name name, const uint8_t *value, uint32_t size, bool free)
uint16_t size
as_operations * as_operations_new(uint16_t nops)
bool as_operations_add_list_append_int64(as_operations *ops, const as_bin_name name, int64_t value)
void as_operations_destroy(as_operations *ops)
static bool as_operations_add_list_insert_str(as_operations *ops, const as_bin_name name, int64_t index, const char *value)
as_binop * entries
as_operations * as_operations_init(as_operations *ops, uint16_t nops)
bool as_operations_add_incr(as_operations *ops, const as_bin_name name, int64_t value)
bool as_operations_add_list_insert_int64(as_operations *ops, const as_bin_name name, int64_t index, int64_t value)
static bool as_operations_add_write_str(as_operations *ops, const as_bin_name name, const char *value)
static bool as_operations_add_prepend_str(as_operations *ops, const as_bin_name name, const char *value)
bool as_operations_add_list_set_strp(as_operations *ops, const as_bin_name name, int64_t index, const char *value, bool free)
bool as_operations_add_list_trim(as_operations *ops, const as_bin_name name, int64_t index, uint64_t count)
static bool as_operations_add_list_set_str(as_operations *ops, const as_bin_name name, int64_t index, const char *value)
bool as_operations_add_prepend_rawp(as_operations *ops, const as_bin_name name, const uint8_t *value, uint32_t size, bool free)
bool as_operations_add_list_insert(as_operations *ops, const as_bin_name name, int64_t index, as_val *val)
Definition: as_bin.h:77
bool as_operations_add_list_pop_range_from(as_operations *ops, const as_bin_name name, int64_t index)
Definition: as_val.h:57
static bool as_operations_add_list_append_str(as_operations *ops, const as_bin_name name, const char *value)
as_cdt_paramtype
Definition: as_operations.h:31
bool as_operations_add_list_set_double(as_operations *ops, const as_bin_name name, int64_t index, double value)
bool as_operations_add_list_get_range(as_operations *ops, const as_bin_name name, int64_t index, uint64_t count)
static bool as_operations_add_append_raw(as_operations *ops, const as_bin_name name, const uint8_t *value, uint32_t size)
as_cdt_optype
Definition: as_operations.h:43
bool as_operations_add_list_append(as_operations *ops, const as_bin_name name, as_val *val)
bool as_operations_add_write_geojson_strp(as_operations *ops, const as_bin_name name, const char *value, bool free)
as_operator
Definition: as_operations.h:99
uint16_t capacity
as_bin bin
bool as_operations_add_list_append_double(as_operations *ops, const as_bin_name name, double value)
bool as_operations_add_list_set(as_operations *ops, const as_bin_name name, int64_t index, as_val *val)
static bool as_operations_add_list_append_raw(as_operations *ops, const as_bin_name name, const uint8_t *value, uint32_t size)
bool as_operations_add_list_get_range_from(as_operations *ops, const as_bin_name name, int64_t index)
bool as_operations_add_write(as_operations *ops, const as_bin_name name, as_bin_value *value)
bool as_operations_add_list_append_items(as_operations *ops, const as_bin_name name, as_list *list)
bool as_operations_add_list_get(as_operations *ops, const as_bin_name name, int64_t index)
as_binops binops
static bool as_operations_add_write_raw(as_operations *ops, const as_bin_name name, const uint8_t *value, uint32_t size)
bool as_operations_add_write_strp(as_operations *ops, const as_bin_name name, const char *value, bool free)
bool as_operations_add_list_clear(as_operations *ops, const as_bin_name name)
bool as_operations_add_list_insert_items(as_operations *ops, const as_bin_name name, int64_t index, as_list *list)
bool as_operations_add_write_rawp(as_operations *ops, const as_bin_name name, const uint8_t *value, uint32_t size, bool free)
bool as_operations_add_list_pop_range(as_operations *ops, const as_bin_name name, int64_t index, uint64_t count)
bool as_operations_add_list_set_rawp(as_operations *ops, const as_bin_name name, int64_t index, const uint8_t *value, uint32_t size, bool free)
static bool as_operations_add_list_set_raw(as_operations *ops, const as_bin_name name, int64_t index, const uint8_t *value, uint32_t size)
static bool as_operations_add_write_geojson_str(as_operations *ops, const as_bin_name name, const char *value)
char as_bin_name[AS_BIN_NAME_MAX_SIZE]
Definition: as_bin.h:52
bool as_operations_add_write_double(as_operations *ops, const as_bin_name name, double value)
bool as_operations_add_list_remove_range(as_operations *ops, const as_bin_name name, int64_t index, uint64_t count)
bool as_operations_add_list_size(as_operations *ops, const as_bin_name name)
bool as_operations_add_incr_double(as_operations *ops, const as_bin_name name, double value)
bool as_operations_add_list_pop(as_operations *ops, const as_bin_name name, int64_t index)
bool as_operations_add_read(as_operations *ops, const as_bin_name name)
bool as_operations_add_append_strp(as_operations *ops, const as_bin_name name, const char *value, bool free)
bool as_operations_add_list_remove_range_from(as_operations *ops, const as_bin_name name, int64_t index)
bool as_operations_add_list_insert_rawp(as_operations *ops, const as_bin_name name, int64_t index, const uint8_t *value, uint32_t size, bool free)
bool as_operations_add_touch(as_operations *ops)
as_operator op
bool as_operations_add_prepend_strp(as_operations *ops, const as_bin_name name, const char *value, bool free)
bool as_operations_add_list_append_strp(as_operations *ops, const as_bin_name name, const char *value, bool free)
static bool as_operations_add_append_str(as_operations *ops, const as_bin_name name, const char *value)
bool as_operations_add_list_insert_double(as_operations *ops, const as_bin_name name, int64_t index, double value)
static bool as_operations_add_list_insert_raw(as_operations *ops, const as_bin_name name, int64_t index, const uint8_t *value, uint32_t size)
bool as_operations_add_list_insert_strp(as_operations *ops, const as_bin_name name, int64_t index, const char *value, bool free)