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-2017 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 /**
32  * Operation Identifiers
33  */
34 typedef enum as_operator_e {
45 } as_operator;
46 
47 /**
48  * Operation on a bin.
49  * The value for the bin will be applied according to the operation.
50  */
51 typedef struct as_binop_s {
52 
53  /**
54  * The operation to be performed on the bin.
55  */
57 
58  /**
59  * The bin the operation will be performed on.
60  */
62 
63 } as_binop;
64 
65 /**
66  * Sequence of operations.
67  *
68  * ~~~~~~~~~~{.c}
69  * as_operations ops;
70  * as_operations_inita(&ops, 2);
71  * as_operations_add_incr(&ops, "bin1", 123);
72  * as_operations_add_append_str(&ops, "bin2", "abc");
73  * ...
74  * as_operations_destroy(&ops);
75  * ~~~~~~~~~~
76  *
77  */
78 typedef struct as_binops_s {
79 
80  /**
81  * @private
82  * If true, then as_binops_destroy() will free the entries.
83  */
84  bool _free;
85 
86  /**
87  * Number of entries allocated
88  */
89  uint16_t capacity;
90 
91  /**
92  * Number of entries used
93  */
94  uint16_t size;
95 
96  /**
97  * Sequence of entries
98  */
100 
101 } as_binops;
102 
103 /**
104  * The `aerospike_key_operate()` function provides the ability to execute
105  * multiple operations on a record in the database as a single atomic
106  * transaction.
107  *
108  * The `as_operations` object is used to define the operations to be performed
109  * on the record.
110  *
111  * ## Initialization
112  *
113  * Before using as_operations, you must first initialize it via either:
114  * - as_operations_inita()
115  * - as_operations_init()
116  * - as_operations_new()
117  *
118  * as_operations_inita() is a macro that initializes a stack allocated
119  * as_operations and allocates an internal array of operations. The macro
120  * accepts a pointer to the stack allocated as_operations and the number of
121  * operations to be added.
122  *
123  * ~~~~~~~~~~{.c}
124  * as_operations ops;
125  * as_operations_inita(&ops, 2);
126  * ~~~~~~~~~~
127  *
128  * as_operations_init() is a function that initializes a stack allocated
129  * as_operations. It differes from as_operations_inita() in that it allocates
130  * the internal array of operations on the heap. It accepts a pointer to the
131  * stack allocated as_operations and the number of operations to be added.
132  *
133  * ~~~~~~~~~~{.c}
134  * as_operations ops;
135  * as_operations_init(&ops, 2);
136  * ~~~~~~~~~~
137  *
138  * as_operations_new() is a function that will allocate a new as_operations
139  * on the heap. It will also allocate the internal array of operation on the
140  * heap.
141  *
142  * ~~~~~~~~~~{.c}
143  * as_operations * ops = as_operations_new(2);
144  * ~~~~~~~~~~
145  *
146  * When you no longer needthe as_operations, you can release the resources
147  * allocated to it via as_operations_destroy().
148  *
149  * ## Destruction
150  *
151  * When you no longer require an as_operations, you should call
152  * `as_operations_destroy()` to release it and associated resources.
153  *
154  * ~~~~~~~~~~{.c}
155  * as_operations_destroy(ops);
156  * ~~~~~~~~~~
157  *
158  * ## Usage
159  *
160  * as_operations is a sequence of operations to be applied to a record.
161  *
162  * Each of the following operations is added to the end of the sequence
163  * of operations.
164  *
165  * When you have compiled the sequence of operations you want to execute,
166  * then you will send it to aerospike_key_operate().
167  *
168  *
169  * ### Modifying a String
170  *
171  * Aerospike allows you to append a string to a bin containing
172  * a string.
173  *
174  * The following appends a "abc" to bin "bin1".
175  *
176  * ~~~~~~~~~~{.c}
177  * as_operations_add_append_str(ops, "bin1", "abc");
178  * ~~~~~~~~~~
179  *
180  * There is also a prepend operation, which will add the string
181  * to the beginning of the bin's current value.
182  *
183  * ~~~~~~~~~~{.c}
184  * as_operations_add_prepend_str(ops, "bin1", "abc");
185  * ~~~~~~~~~~
186  *
187  * ### Modifying a Byte Array
188  *
189  * Aerospike allows you to append a byte array to a bin containing
190  * a byte array.
191  *
192  * The following appends a 4 byte sequence to bin "bin1".
193  *
194  * ~~~~~~~~~~{.c}
195  * uint8_t raw[4] = { 1, 2, 3, 4 };
196  * as_operations_add_append_raw(ops, "bin1", raw, 4);
197  * ~~~~~~~~~~
198  *
199  * There is also a prepend operation, which will add the bytes
200  * to the beginning of the bin's current value.
201  *
202  * ~~~~~~~~~~{.c}
203  * uint8_t raw[4] = { 1, 2, 3, 4 };
204  * as_operations_add_prepend_raw(ops, "bin1", raw, 4);
205  * ~~~~~~~~~~
206  *
207  * ### Increment an Integer
208  *
209  * Aerospike allows you to increment the value of a bin
210  *
211  * The following increments the value in bin "bin1" by 4.
212  *
213  * ~~~~~~~~~~{.c}
214  * as_operations_add_incr(ops, "bin1", 4);
215  * ~~~~~~~~~~
216  *
217  * ### Write a Value
218  *
219  * Write a value into a bin. Overwriting previous value.
220  *
221  * The following writes a string "xyz" to "bin1".
222  *
223  * ~~~~~~~~~~{.c}
224  * as_operations_add_write_str(ops, "bin1", "xyz");
225  * ~~~~~~~~~~
226  *
227  * ### Read a Value
228  *
229  * Read a value from a bin. This is ideal, if you performed an
230  * operation on a bin, and want to read the new value.
231  *
232  * The following reads the value of "bin1"
233  *
234  * ~~~~~~~~~~{.c}
235  * as_operations_add_read(ops, "bin1", "xyz");
236  * ~~~~~~~~~~
237  *
238  * ### Touch a Record
239  *
240  * Touching a record will refresh its ttl and increment the generation
241  * of the record.
242  *
243  * The following touches a record.
244  *
245  * ~~~~~~~~~~{.c}
246  * as_operations_add_touch(ops);
247  * ~~~~~~~~~~
248  *
249  * @ingroup client_objects
250  */
251 typedef struct as_operations_s {
252 
253  /**
254  * @private
255  * If true, then as_operations_destroy() will free this instance.
256  */
257  bool _free;
258 
259  /**
260  * The generation of the record.
261  */
262  uint16_t gen;
263 
264  /**
265  * The time-to-live (expiration) of the record in seconds.
266  */
267  uint32_t ttl;
268 
269  /**
270  * Operations to be performed on the bins of a record.
271  */
273 
274 } as_operations;
275 
276 /******************************************************************************
277  * MACROS
278  *****************************************************************************/
279 
280 /**
281  * Initializes a stack allocated `as_operations` (as_operations) and allocates
282  * `__nops` number of entries on the stack.
283  *
284  * ~~~~~~~~~~{.c}
285  * as_operations ops;
286  * as_operations_inita(&ops, 2);
287  * as_operations_add_incr(&ops, "bin1", 123);
288  * as_operations_add_append_str(&ops, "bin2", "abc");
289  * ~~~~~~~~~~
290  *
291  * @param __ops The `as_operations *` to initialize.
292  * @param __nops The number of `as_binops.entries` to allocate on the
293  * stack.
294  *
295  * @relates as_operations
296  * @ingroup as_operations_object
297  */
298 #define as_operations_inita(__ops, __nops) \
299  (__ops)->_free = false;\
300  (__ops)->gen = 0;\
301  (__ops)->ttl = 0;\
302  (__ops)->binops._free = false;\
303  (__ops)->binops.capacity = (__nops);\
304  (__ops)->binops.size = 0;\
305  (__ops)->binops.entries = (as_binop*) alloca(sizeof(as_binop) * (__nops));
306 
307 /******************************************************************************
308  * FUNCTIONS
309  *****************************************************************************/
310 
311 /**
312  * Intializes a stack allocated `as_operations`.
313  *
314  * ~~~~~~~~~~{.c}
315  * as_operations ops;
316  * as_operations_init(&ops, 2);
317  * as_operations_add_incr(&ops, "bin1", 123);
318  * as_operations_add_append_str(&ops, "bin2", "abc");
319  * ~~~~~~~~~~
320  *
321  * Use `as_operations_destroy()` to free the resources allocated to the
322  * `as_operations`.
323  *
324  * @param ops The `as_operations` to initialize.
325  * @param nops The number of `as_operations.binops.entries` to allocate on the heap.
326  *
327  * @return The initialized `as_operations` on success. Otherwise NULL.
328  *
329  * @relates as_operations
330  * @ingroup as_operations_object
331  */
332 as_operations * as_operations_init(as_operations * ops, uint16_t nops);
333 
334 /**
335  * Create and initialize a heap allocated `as_operations`.
336  *
337  * ~~~~~~~~~~{.c}
338  * as_operations ops = as_operations_new(2);
339  * as_operations_add_incr(ops, "bin1", 123);
340  * as_operations_add_append_str(ops, "bin2", "abc");
341  * ~~~~~~~~~~
342  *
343  * Use `as_operations_destroy()` to free the resources allocated to the
344  * `as_operations`.
345  *
346  * @param nops The number of `as_operations.binops.entries` to allocate on the heap.
347  *
348  * @return The new `as_operations` on success. Otherwise NULL.
349  *
350  * @relates as_operations
351  * @ingroup as_operations_object
352  */
353 as_operations * as_operations_new(uint16_t nops);
354 
355 /**
356  * Destroy an `as_operations` and release associated resources.
357  *
358  * ~~~~~~~~~~{.c}
359  * as_operations_destroy(binops);
360  * ~~~~~~~~~~
361  *
362  * @param ops The `as_operations` to destroy.
363  *
364  * @relates as_operations
365  * @ingroup as_operations_object
366  */
368 
369 /**
370  * Add a `AS_OPERATOR_WRITE` bin operation.
371  *
372  * @param ops The `as_operations` to append the operation to.
373  * @param name The name of the bin to perform the operation on.
374  * @param value The value to be used in the operation.
375  *
376  * @return true on success. Otherwise an error occurred.
377  *
378  * @relates as_operations
379  * @ingroup as_operations_object
380  */
381 bool as_operations_add_write(as_operations * ops, const as_bin_name name, as_bin_value * value);
382 
383 /**
384  * Add a `AS_OPERATOR_WRITE` bin operation with an int64_t value.
385  *
386  * @param ops The `as_operations` to append the operation to.
387  * @param name The name of the bin to perform the operation on.
388  * @param value The value to be used in the operation.
389  *
390  * @return true on success. Otherwise an error occurred.
391  *
392  * @relates as_operations
393  * @ingroup as_operations_object
394  */
395 bool as_operations_add_write_int64(as_operations * ops, const as_bin_name name, int64_t value);
396 
397 /**
398  * Add a `AS_OPERATOR_WRITE` bin operation with a double value.
399  *
400  * @param ops The `as_operations` to append the operation to.
401  * @param name The name of the bin to perform the operation on.
402  * @param value The value to be used in the operation.
403  *
404  * @return true on success. Otherwise an error occurred.
405  *
406  * @relates as_operations
407  * @ingroup as_operations_object
408  */
409 bool as_operations_add_write_double(as_operations * ops, const as_bin_name name, double value);
410 
411 /**
412  * Add a `AS_OPERATOR_WRITE` bin operation with a NULL-terminated string value.
413  *
414  * @param ops The `as_operations` to append the operation to.
415  * @param name The name of the bin to perform the operation on.
416  * @param value The value to be used in the operation.
417  * @param free If true, then the value will be freed when the operations is destroyed.
418  *
419  * @return true on success. Otherwise an error occurred.
420  *
421  * @relates as_operations
422  * @ingroup as_operations_object
423  */
424 bool as_operations_add_write_strp(as_operations * ops, const as_bin_name name, const char * value, bool free);
425 
426 /**
427  * Add a `AS_OPERATOR_WRITE` bin operation with a NULL-terminated string value.
428  *
429  * @param ops The `as_operations` to append the operation to.
430  * @param name The name of the bin to perform the operation on.
431  * @param value The value to be used in the operation. Must last for the lifetime of the operations.
432  *
433  * @return true on success. Otherwise an error occurred.
434  *
435  * @relates as_operations
436  * @ingroup as_operations_object
437  */
438 static inline bool as_operations_add_write_str(as_operations * ops, const as_bin_name name, const char * value)
439 {
440  return as_operations_add_write_strp(ops, name, value, false);
441 }
442 
443 /**
444  * Add a `AS_OPERATOR_WRITE` bin operation with a NULL-terminated GeoJSON string value.
445  *
446  * @param ops The `as_operations` to append the operation to.
447  * @param name The name of the bin to perform the operation on.
448  * @param value The value to be used in the operation.
449  * @param free If true, then the value will be freed when the operations is destroyed.
450  *
451  * @return true on success. Otherwise an error occurred.
452  *
453  * @relates as_operations
454  * @ingroup as_operations_object
455  */
456 bool as_operations_add_write_geojson_strp(as_operations * ops, const as_bin_name name, const char * value, bool free);
457 
458 /**
459  * Add a `AS_OPERATOR_WRITE` bin operation with a NULL-terminated GeoJSON string value.
460  *
461  * @param ops The `as_operations` to append the operation to.
462  * @param name The name of the bin to perform the operation on.
463  * @param value The value to be used in the operation. Must last for the lifetime of the operations.
464  *
465  * @return true on success. Otherwise an error occurred.
466  *
467  * @relates as_operations
468  * @ingroup as_operations_object
469  */
470 static inline bool as_operations_add_write_geojson_str(as_operations * ops, const as_bin_name name, const char * value)
471 {
472  return as_operations_add_write_geojson_strp(ops, name, value, false);
473 }
474 
475 /**
476  * Add a `AS_OPERATOR_WRITE` bin operation with a raw bytes 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  * @param size The size of the value.
482  * @param free If true, then the value will be freed when the operations is destroyed.
483  *
484  * @return true on success. Otherwise an error occurred.
485  *
486  * @relates as_operations
487  * @ingroup as_operations_object
488  */
489 bool as_operations_add_write_rawp(as_operations * ops, const as_bin_name name, const uint8_t * value, uint32_t size, bool free);
490 
491 /**
492  * Add a `AS_OPERATOR_WRITE` bin operation with a raw bytes value.
493  *
494  * @param ops The `as_operations` to append the operation to.
495  * @param name The name of the bin to perform the operation on.
496  * @param value The value to be used in the operation.
497  * @param size The size of the value. Must last for the lifetime of the operations.
498  *
499  * @return true on success. Otherwise an error occurred.
500  *
501  * @relates as_operations
502  * @ingroup as_operations_object
503  */
504 static inline bool as_operations_add_write_raw(as_operations * ops, const as_bin_name name, const uint8_t * value, uint32_t size)
505 {
506  return as_operations_add_write_rawp(ops, name, value, size, false);
507 }
508 
509 /**
510  * Add a `AS_OPERATOR_READ` bin operation.
511  *
512  * @param ops The `as_operations` to append the operation to.
513  * @param name The name of the bin to perform the operation on.
514  *
515  * @return true on success. Otherwise an error occurred.
516  *
517  * @relates as_operations
518  * @ingroup as_operations_object
519  */
520 bool as_operations_add_read(as_operations * ops, const as_bin_name name);
521 
522 /**
523  * Add a `AS_OPERATOR_INCR` bin operation with (required) int64_t value.
524  *
525  * @param ops The `as_operations` to append the operation to.
526  * @param name The name of the bin to perform the operation on.
527  * @param value The value to be used in the operation.
528  *
529  * @return true on success. Otherwise an error occurred.
530  *
531  * @relates as_operations
532  * @ingroup as_operations_object
533  */
534 bool as_operations_add_incr(as_operations * ops, const as_bin_name name, int64_t value);
535 
536 /**
537  * Add a `AS_OPERATOR_INCR` bin operation with double value.
538  *
539  * @param ops The `as_operations` to append the operation to.
540  * @param name The name of the bin to perform the operation on.
541  * @param value The value to be used in the operation.
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_incr_double(as_operations * ops, const as_bin_name name, double value);
549 
550 /**
551  * Add a `AS_OPERATOR_PREPEND` bin operation with a NULL-terminated 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.
556  * @param free If true, then the value will be freed when the operations is destroyed.
557  *
558  * @return true on success. Otherwise an error occurred.
559  *
560  * @relates as_operations
561  * @ingroup as_operations_object
562  */
563 bool as_operations_add_prepend_strp(as_operations * ops, const as_bin_name name, const char * value, bool free);
564 
565 /**
566  * Add a `AS_OPERATOR_PREPEND` bin operation with a NULL-terminated string value.
567  *
568  * @param ops The `as_operations` to append the operation to.
569  * @param name The name of the bin to perform the operation on.
570  * @param value The value to be used in the operation. Must last for the lifetime of the operations.
571  *
572  * @return true on success. Otherwise an error occurred.
573  *
574  * @relates as_operations
575  * @ingroup as_operations_object
576  */
577 static inline bool as_operations_add_prepend_str(as_operations * ops, const as_bin_name name, const char * value)
578 {
579  return as_operations_add_prepend_strp(ops, name, value, false);
580 }
581 
582 /**
583  * Add a `AS_OPERATOR_PREPEND` bin operation with a raw bytes value.
584  *
585  * @param ops The `as_operations` to append the operation to.
586  * @param name The name of the bin to perform the operation on.
587  * @param value The value to be used in the operation.
588  * @param size The size of the value.
589  * @param free If true, then the value will be freed when the operations is destroyed.
590  *
591  * @return true on success. Otherwise an error occurred.
592  *
593  * @relates as_operations
594  * @ingroup as_operations_object
595  */
596 bool as_operations_add_prepend_rawp(as_operations * ops, const as_bin_name name, const uint8_t * value, uint32_t size, bool free);
597 
598 /**
599  * Add a `AS_OPERATOR_PREPEND` bin operation with a raw bytes value.
600  *
601  * @param ops The `as_operations` to append the operation to.
602  * @param name The name of the bin to perform the operation on.
603  * @param value The value to be used in the operation. Must last for the lifetime of the operations.
604  * @param size The size of the value.
605  *
606  * @return true on success. Otherwise an error occurred.
607  *
608  * @relates as_operations
609  * @ingroup as_operations_object
610  */
611 static inline bool as_operations_add_prepend_raw(as_operations * ops, const as_bin_name name, const uint8_t * value, uint32_t size)
612 {
613  return as_operations_add_prepend_rawp(ops, name, value, size, false);
614 }
615 
616 /**
617  * Add a `AS_OPERATOR_APPEND` bin operation with a NULL-terminated string value.
618  *
619  * @param ops The `as_operations` to append the operation to.
620  * @param name The name of the bin to perform the operation on.
621  * @param value The value to be used in the operation.
622  * @param free If true, then the value will be freed when the operations is destroyed.
623  *
624  * @return true on success. Otherwise an error occurred.
625  *
626  * @relates as_operations
627  * @ingroup as_operations_object
628  */
629 bool as_operations_add_append_strp(as_operations * ops, const as_bin_name name, const char * value, bool free);
630 
631 /**
632  * Add a `AS_OPERATOR_APPEND` bin operation with a NULL-terminated string value.
633  *
634  * @param ops The `as_operations` to append the operation to.
635  * @param name The name of the bin to perform the operation on.
636  * @param value The value to be used in the operation. Must last for the lifetime of the operations.
637  *
638  * @return true on success. Otherwise an error occurred.
639  *
640  * @relates as_operations
641  * @ingroup as_operations_object
642  */
643 static inline bool as_operations_add_append_str(as_operations * ops, const as_bin_name name, const char * value)
644 {
645  return as_operations_add_append_strp(ops, name, value, false);
646 }
647 
648 /**
649  * Add a `AS_OPERATOR_APPEND` bin operation with a raw bytes value.
650  *
651  * @param ops The `as_operations` to append the operation to.
652  * @param name The name of the bin to perform the operation on.
653  * @param value The value to be used in the operation.
654  * @param size The size of the value.
655  * @param free If true, then the value will be freed when the operations is destroyed.
656  *
657  * @return true on success. Otherwise an error occurred.
658  *
659  * @relates as_operations
660  * @ingroup as_operations_object
661  */
662 bool as_operations_add_append_rawp(as_operations * ops, const as_bin_name name, const uint8_t * value, uint32_t size, bool free);
663 
664 /**
665  * Add a `AS_OPERATOR_APPEND` bin operation with a raw bytes value.
666  *
667  * @param ops The `as_operations` to append the operation to.
668  * @param name The name of the bin to perform the operation on.
669  * @param value The value to be used in the operation. Must last for the lifetime of the operations.
670  * @param size The size of the value.
671  *
672  * @return true on success. Otherwise an error occurred.
673  *
674  * @relates as_operations
675  * @ingroup as_operations_object
676  */
677 static inline bool as_operations_add_append_raw(as_operations * ops, const as_bin_name name, const uint8_t * value, uint32_t size)
678 {
679  return as_operations_add_append_rawp(ops, name, value, size, false);
680 }
681 
682 /**
683  * Add a `AS_OPERATOR_TOUCH` record operation.
684  *
685  * @param ops The `as_operations` to append the operation to.
686  *
687  * @return true on success. Otherwise an error occurred.
688  *
689  * @relates as_operations
690  * @ingroup as_operations_object
691  */
693 
694 /******************************************************************************
695  * LIST FUNCTIONS
696  *****************************************************************************/
697 
698 // Add list operations to this header file for legacy reasons.
699 
701 
702 #ifdef __cplusplus
703 } // end extern "C"
704 #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)
uint16_t size
Definition: as_operations.h:94
as_operations * as_operations_new(uint16_t nops)
void as_operations_destroy(as_operations *ops)
as_binop * entries
Definition: as_operations.h:99
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)
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_prepend_rawp(as_operations *ops, const as_bin_name name, const uint8_t *value, uint32_t size, bool free)
Definition: as_bin.h:77
static bool as_operations_add_append_raw(as_operations *ops, const as_bin_name name, const uint8_t *value, uint32_t size)
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:34
uint16_t capacity
Definition: as_operations.h:89
as_bin bin
Definition: as_operations.h:61
bool as_operations_add_write(as_operations *ops, const as_bin_name name, as_bin_value *value)
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_write_rawp(as_operations *ops, const as_bin_name name, const uint8_t *value, uint32_t size, bool free)
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_incr_double(as_operations *ops, const as_bin_name name, double value)
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_touch(as_operations *ops)
as_operator op
Definition: as_operations.h:56
bool as_operations_add_prepend_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)