All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
as_query.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2008-2013 by Aerospike.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to
6  * deal in the Software without restriction, including without limitation the
7  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8  * sell copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20  * IN THE SOFTWARE.
21  *****************************************************************************/
22 
23 #pragma once
24 #pragma GCC diagnostic ignored "-Waddress"
25 
26 #include <aerospike/as_bin.h>
27 #include <aerospike/as_key.h>
28 #include <aerospike/as_list.h>
29 #include <aerospike/as_udf.h>
30 
31 #include <stdarg.h>
32 
33 /******************************************************************************
34  * MACROS
35  *****************************************************************************/
36 
37 /**
38  * Macro for setting setting the STRING_EQUAL predicate.
39  *
40  * ~~~~~~~~~~{.c}
41  * as_query_where(query, "bin1", string_equals("abc"));
42  * ~~~~~~~~~~
43  *
44  * @relates as_query
45  */
46 #define string_equals(__val) AS_PREDICATE_STRING_EQUAL, __val
47 
48 /**
49  * Macro for setting setting the INTEGER_EQUAL predicate.
50  *
51  * ~~~~~~~~~~{.c}
52  * as_query_where(query, "bin1", integer_equals(123));
53  * ~~~~~~~~~~
54  *
55  * @relates as_query
56  */
57 #define integer_equals(__val) AS_PREDICATE_INTEGER_EQUAL, __val
58 
59 /**
60  * Macro for setting setting the INTEGER_RANGE predicate.
61  *
62  * ~~~~~~~~~~{.c}
63  * as_query_where(query, "bin1", integer_range(1,100));
64  * ~~~~~~~~~~
65  *
66  * @relates as_query
67  * @ingroup query_object
68  */
69 #define integer_range(__min, __max) AS_PREDICATE_INTEGER_RANGE, __min, __max
70 
71 /******************************************************************************
72  * TYPES
73  *****************************************************************************/
74 
75 /**
76  * Union of supported predicates
77  */
78 typedef union as_predicate_value_u {
79 
80  /**
81  * String Value
82  */
83  char * string;
84 
85  /**
86  * Integer Value
87  */
88  int64_t integer;
89 
90  /**
91  * Integer Range Value
92  */
93  struct {
94 
95  /**
96  * Minimum value
97  */
98  int64_t min;
99 
100  /**
101  * Maximum value
102  */
103  int64_t max;
104 
105  } integer_range;
106 
108 
109 /**
110  * The types of predicates supported.
111  */
112 typedef enum as_predicate_type_e {
113 
114  /**
115  * String Equality Predicate.
116  * Requires as_predicate_value.string to be set.
117  */
119 
120  /**
121  * Integer Equality Predicate.
122  * Requires as_predicate_value.integer to be set.
123  */
125 
126  /**
127  * Integer Range Predicate.
128  * Requires as_predicate_value.integer_range to be set.
129  */
131 
133 
134 /**
135  * Defines a predicate, including the bin, type of predicate and the value
136  * for the predicate.
137  */
138 typedef struct as_predicate_s {
139 
140  /**
141  * Bin to apply the predicate to
142  */
144 
145  /**
146  * The predicate type, dictates which value to use from the union
147  */
149 
150  /**
151  * The value for the predicate.
152  */
154 
155 } as_predicate;
156 
157 /**
158  * Enumerations defining the direction of an ordering.
159  */
160 typedef enum as_order_e {
161 
162  /**
163  * Ascending order
164  */
166 
167  /**
168  * bin should be in ascending order
169  */
171 
172 } as_order;
173 
174 
175 /**
176  * Defines the direction a bin should be ordered by.
177  */
178 typedef struct as_ordering_s {
179 
180  /**
181  * Name of the bin to sort by
182  */
184 
185  /**
186  * Direction of the sort
187  */
189 
190 } as_ordering;
191 
192 /**
193  * Sequence of bins which should be selected during a query.
194  *
195  * Entries can either be initialized on the stack or on the heap.
196  *
197  * Initialization should be performed via a query object, using:
198  * - as_query_select_init()
199  * - as_query_select_inita()
200  */
201 typedef struct as_query_bins_s {
202 
203  /**
204  * @private
205  * If true, then as_query_destroy() will free this instance.
206  */
207  bool _free;
208 
209  /**
210  * Number of entries allocated
211  */
212  uint16_t capacity;
213 
214  /**
215  * Number of entries used
216  */
217  uint16_t size;
218 
219  /**
220  * Sequence of entries
221  */
223 
224 } as_query_bins;
225 
226 /**
227  * Sequence of predicates to be applied to a query.
228  *
229  * Entries can either be initialized on the stack or on the heap.
230  *
231  * Initialization should be performed via a query object, using:
232  * - as_query_where_init()
233  * - as_query_where_inita()
234  */
235 typedef struct as_query_predicates_s {
236 
237  /**
238  * @private
239  * If true, then as_query_destroy() will free this instance.
240  */
241  bool _free;
242 
243  /**
244  * Number of entries allocated
245  */
246  uint16_t capacity;
247 
248  /**
249  * Number of entries used
250  */
251  uint16_t size;
252 
253  /**
254  * Sequence of entries
255  */
257 
259 
260 /**
261  * Sequence of ordering to be applied to a query results.
262  *
263  * Entries can either be initialized on the stack or on the heap.
264  *
265  * Initialization should be performed via a query object, using:
266  * - as_query_orderby_init()
267  * - as_query_orderby_inita()
268  */
269 typedef struct as_query_sort_s {
270 
271  /**
272  * @private
273  * If true, then as_query_destroy() will free this instance.
274  */
275  bool _free;
276 
277  /**
278  * Number of entries allocated
279  */
280  uint16_t capacity;
281 
282  /**
283  * Number of entries used
284  */
285  uint16_t size;
286 
287  /**
288  * Sequence of entries
289  */
291 
293 
294 
295 /**
296  * The as_query object is used define a query to be executed in the datasbase.
297  *
298  * ## Initialization
299  *
300  * Before using an as_query, it must be initialized via either:
301  * - as_query_init()
302  * - as_query_new()
303  *
304  * as_query_init() should be used on a stack allocated as_query. It will
305  * initialize the as_query with the given namespace and set. On success,
306  * it will return a pointer to the initialized as_query. Otherwise, NULL
307  * is returned.
308  *
309  * ~~~~~~~~~~{.c}
310  * as_query query;
311  * as_query_init(&query, "namespace", "set");
312  * ~~~~~~~~~~
313  *
314  * as_query_new() should be used to allocate and initialize a heap allocated
315  * as_query. It will allocate the as_query, then initialized it with the
316  * given namespace and set. On success, it will return a pointer to the
317  * initialized as_query. Otherwise, NULL is returned.
318  *
319  * ~~~~~~~~~~{.c}
320  * as_query * query = as_query_new("namespace", "set");
321  * ~~~~~~~~~~
322  *
323  * ## Destruction
324  *
325  * When you are finished with the as_query, you can destroy it and associated
326  * resources:
327  *
328  * ~~~~~~~~~~{.c}
329  * as_query_destroy(query);
330  * ~~~~~~~~~~
331  *
332  * ## Usage
333  *
334  * The following explains how to use an as_query to build a query.
335  *
336  * ### Selecting Bins
337  *
338  * as_query_select() is used to specify the bins to be selected by the query.
339  *
340  * ~~~~~~~~~~{.c}
341  * as_query_select(query, "bin1");
342  * as_query_select(query, "bin2");
343  * ~~~~~~~~~~
344  *
345  * Before adding bins to select, the select structure must be initialized via
346  * either:
347  * - as_query_select_inita() - Initializes the structure on the stack.
348  * - as_query_select_init() - Initializes the structure on the heap.
349  *
350  * Both functions are given the number of bins to be selected.
351  *
352  * A complete example using as_query_select_inita()
353  *
354  * ~~~~~~~~~~{.c}
355  * as_query_select_inita(query, 2);
356  * as_query_select(query, "bin1");
357  * as_query_select(query, "bin2");
358  * ~~~~~~~~~~
359  *
360  *
361  * ### Predicates on Bins
362  *
363  * as_query_where() is used to specify predicates to be added to the the query.
364  *
365  * **Note:** Currently, a single where predicate is supported. To do more advanced filtering,
366  * you will want to use a UDF to process the result set on the server.
367  *
368  * ~~~~~~~~~~{.c}
369  * as_query_where(query, "bin1", string_equals("abc"));
370  * ~~~~~~~~~~
371  *
372  * The predicates that you can apply to a bin include:
373  * - string_equals() - Test for string equality.
374  * - integer_equals() - Test for integer equality.
375  * - integer_range() - Test for integer within a range.
376  *
377  * Before adding predicates, the where structure must be initialized. To
378  * initialize the where structure, you can choose to use one of the following:
379  * - as_query_where_inita() - Initializes the structure on the stack.
380  * - as_query_where_init() - Initializes the structure on the heap.
381  *
382  * Both functions are given the number of predicates to be added.
383  *
384  * A complete example using as_query_where_inita():
385  *
386  * ~~~~~~~~~~{.c}
387  * as_query_where_inita(query, 1);
388  * as_query_where(query, "bin1", string_equals("abc"));
389  * ~~~~~~~~~~
390  *
391  *
392  * ### Sorting Results
393  *
394  * as_query_orderby() is used to specify ordering of results of a query.
395  *
396  * ~~~~~~~~~~{.c}
397  * as_query_orderby(query, "bin1", AS_ORDER_ASCENDING);
398  * ~~~~~~~~~~
399  *
400  * The sort order can be:
401  * - `AS_ORDER_ASCENDING`
402  * - `AS_ORDER_DESCENDING`
403  *
404  * Before adding ordering, the orderby structure must be initialized via
405  * either:
406  * - as_query_orderby_inita() - Initializes the structure on the stack.
407  * - as_query_orderby_init() - Initializes the structure on the heap.
408  *
409  * Both functions are given the number of orderings to be added.
410  *
411  * A complete example using as_query_orderby_inita():
412  *
413  * ~~~~~~~~~~{.c}
414  * as_query_orderby_inita(query, 2);
415  * as_query_orderby(query, "bin1", AS_ORDER_ASCENDING);
416  * as_query_orderby(query, "bin2", AS_ORDER_ASCENDING);
417  * ~~~~~~~~~~
418  *
419  * ### Applying a UDF to Query Results
420  *
421  * A UDF can be applied to the results of a query.
422  *
423  * To define the UDF for the query, use as_query_apply().
424  *
425  * ~~~~~~~~~~{.c}
426  * as_query_apply(query, "udf_module", "udf_function", arglist);
427  * ~~~~~~~~~~
428  *
429  * @ingroup client_objects
430  */
431 typedef struct as_query_s {
432 
433  /**
434  * @private
435  * If true, then as_query_destroy() will free this instance.
436  */
437  bool _free;
438 
439  /**
440  * Namespace to be queried.
441  *
442  * Should be initialized via either:
443  * - as_query_init() - To initialize a stack allocated query.
444  * - as_query_new() - To heap allocate and initialize a query.
445  */
447 
448  /**
449  * Set to be queried.
450  *
451  * Should be initialized via either:
452  * - as_query_init() - To initialize a stack allocated query.
453  * - as_query_new() - To heap allocate and initialize a query.
454  */
456 
457  /**
458  * Name of bins to select.
459  *
460  * Use either of the following function to initialize:
461  * - as_query_select_init() - To initialize on the heap.
462  * - as_query_select_inita() - To initialize on the stack.
463  *
464  * Use as_query_select() to populate.
465  */
467 
468  /**
469  * Predicates for filtering.
470  *
471  * Use either of the following function to initialize:
472  * - as_query_where_init() - To initialize on the heap.
473  * - as_query_where_inita() - To initialize on the stack.
474  *
475  * Use as_query_where() to populate.
476  */
478 
479  /**
480  * Bins to order by.
481  *
482  * Use either of the following function to initialize:
483  * - as_query_orderby_init() - To initialize on the heap.
484  * - as_query_orderby_inita() - To initialize on the stack.
485  *
486  * Use as_query_orderby() to populate.
487  */
489 
490  /**
491  * UDF to apply to results of the query
492  *
493  * Should be set via `as_query_apply()`.
494  */
496 
497 } as_query;
498 
499 /******************************************************************************
500  * INSTANCE FUNCTIONS
501  *****************************************************************************/
502 
503 /**
504  * Initialize a stack allocated as_query.
505  *
506  * ~~~~~~~~~~{.c}
507  * as_query query;
508  * as_query_init(&query, "test", "demo");
509  * ~~~~~~~~~~
510  *
511  * @param query The query to initialize.
512  * @param ns The namespace to query.
513  * @param set The set to query.
514  *
515  * @return On success, the initialized query. Otherwise NULL.
516  *
517  * @relates as_query
518  */
519 as_query * as_query_init(as_query * query, const as_namespace ns, const as_set set);
520 
521 /**
522  * Create and initialize a new heap allocated as_query.
523  *
524  * ~~~~~~~~~~{.c}
525  * as_query * query = as_query_new("test", "demo");
526  * ~~~~~~~~~~
527  *
528  * @param ns The namespace to query.
529  * @param set The set to query.
530  *
531  * @return On success, the new query. Otherwise NULL.
532  *
533  * @relates as_query
534  * @ingroup query_object
535  */
536 as_query * as_query_new(const as_namespace ns, const as_set set);
537 
538 /**
539  * Destroy the query and associated resources.
540  *
541  * ~~~~~~~~~~{.c}
542  * as_query_destroy(scan);
543  * ~~~~~~~~~~
544  *
545  * @param query The query to destroy.
546  *
547  * @relates as_query
548  */
549 void as_query_destroy(as_query * query);
550 
551 /******************************************************************************
552  * SELECT FUNCTIONS
553  *****************************************************************************/
554 
555 /**
556  * Initializes `as_query.select` with a capacity of `n` using `alloca`
557  *
558  * For heap allocation, use `as_query_select_init()`.
559  *
560  * ~~~~~~~~~~{.c}
561  * as_query_select_inita(&query, 2);
562  * as_query_select(&query, "bin1");
563  * as_query_select(&query, "bin2");
564  * ~~~~~~~~~~
565  *
566  * @param __query The query to initialize.
567  * @param __n The number of bins to allocate.
568  *
569  * @relates as_query
570  * @ingroup query_object
571  */
572 #define as_query_select_inita(__query, __n) \
573  if ( (__query) != NULL && (__query)->select.entries == NULL ) {\
574  (__query)->select.entries = (as_bin_name *) alloca(__n * sizeof(as_bin_name));\
575  if ( (__query)->select.entries ) { \
576  (__query)->select._free = false;\
577  (__query)->select.capacity = __n;\
578  (__query)->select.size = 0;\
579  }\
580  }
581 
582 /**
583  * Initializes `as_query.select` with a capacity of `n` using `malloc()`.
584  *
585  * For stack allocation, use `as_query_select_inita()`.
586  *
587  * ~~~~~~~~~~{.c}
588  * as_query_select_init(&query, 2);
589  * as_query_select(&query, "bin1");
590  * as_query_select(&query, "bin2");
591  * ~~~~~~~~~~
592  *
593  * @param query The query to initialize.
594  * @param n The number of bins to allocate.
595  *
596  * @return On success, the initialized. Otherwise an error occurred.
597  *
598  * @relates as_query
599  * @ingroup query_object
600  */
601 bool as_query_select_init(as_query * query, uint16_t n);
602 
603 /**
604  * Select bins to be projected from matching records.
605  *
606  * You have to ensure as_query.select has sufficient capacity, prior to
607  * adding a bin. If capacity is sufficient then false is returned.
608  *
609  * ~~~~~~~~~~{.c}
610  * as_query_select_init(&query, 2);
611  * as_query_select(&query, "bin1");
612  * as_query_select(&query, "bin2");
613  * ~~~~~~~~~~
614  *
615  * @param query The query to modify.
616  * @param bin The name of the bin to select.
617  *
618  * @return On success, true. Otherwise an error occurred.
619  *
620  * @relates as_query
621  * @ingroup query_object
622  */
623 bool as_query_select(as_query * query, const char * bin);
624 
625 /******************************************************************************
626  * WHERE FUNCTIONS
627  *****************************************************************************/
628 
629 /**
630  * Initializes `as_query.where` with a capacity of `n` using `alloca()`.
631  *
632  * For heap allocation, use `as_query_where_init()`.
633  *
634  * ~~~~~~~~~~{.c}
635  * as_query_where_inita(&query, 3);
636  * as_query_where(&query, "bin1", string_equals("abc"));
637  * as_query_where(&query, "bin2", integer_equals(123));
638  * as_query_where(&query, "bin3", integer_range(0,123));
639  * ~~~~~~~~~~
640  *
641  * @param __query The query to initialize.
642  * @param __n The number of as_predicate to allocate.
643  *
644  * @return On success, true. Otherwise an error occurred.
645  *
646  * @relates as_query
647  */
648 #define as_query_where_inita(__query, __n) \
649  if ( (__query) != NULL && (__query)->where.entries == NULL ) {\
650  (__query)->where.entries = (as_predicate *) alloca(__n * sizeof(as_predicate));\
651  if ( (__query)->where.entries ) { \
652  (__query)->where._free = false;\
653  (__query)->where.capacity = __n;\
654  (__query)->where.size = 0;\
655  }\
656  }
657 
658 /**
659  * Initializes `as_query.where` with a capacity of `n` using `malloc()`.
660  *
661  * For stack allocation, use `as_query_where_inita()`.
662  *
663  * ~~~~~~~~~~{.c}
664  * as_query_where_init(&query, 3);
665  * as_query_where(&query, "bin1", string_equals("abc"));
666  * as_query_where(&query, "bin1", integer_equals(123));
667  * as_query_where(&query, "bin1", integer_range(0,123));
668  * ~~~~~~~~~~
669  *
670  * @param query The query to initialize.
671  * @param n The number of as_predicate to allocate.
672  *
673  * @return On success, true. Otherwise an error occurred.
674  *
675  * @relates as_query
676  */
677 bool as_query_where_init(as_query * query, uint16_t n);
678 
679 /**
680  * Add a predicate to the query.
681  *
682  * You have to ensure as_query.where has sufficient capacity, prior to
683  * adding a predicate. If capacity is insufficient then false is returned.
684  *
685  * ~~~~~~~~~~{.c}
686  * as_query_where_init(&query, 3);
687  * as_query_where(&query, "bin1", string_equals("abc"));
688  * as_query_where(&query, "bin1", integer_equals(123));
689  * as_query_where(&query, "bin1", integer_range(0,123));
690  * ~~~~~~~~~~
691  *
692  * @param query The query add the predicate to.
693  * @param bin The name of the bin the predicate will apply to.
694  * @param type The type of predicate.
695  * @param ... The values for the predicate.
696  *
697  * @return On success, true. Otherwise an error occurred.
698  *
699  * @relates as_query
700  */
701 bool as_query_where(as_query * query, const char * bin, as_predicate_type type, ... );
702 
703 /******************************************************************************
704  * ORDERBY FUNCTIONS
705  *****************************************************************************/
706 
707 /**
708  * Initializes `as_query.where` with a capacity of `n` using `alloca()`.
709  *
710  * For heap allocation, use `as_query_where_init()`.
711  *
712  * ~~~~~~~~~~{.c}
713  * as_query_orderby_inita(&query, 1);
714  * as_query_orderby(&query, "bin1", AS_ORDER_ASCENDING);
715  * ~~~~~~~~~~
716  *
717  * @param __query The query to initialize.
718  * @param __n The number of as_orders to allocate.
719  *
720  * @return On success, true. Otherwise an error occurred.
721  *
722  * @relates as_query
723  */
724 #define as_query_orderby_inita(__query, __n) \
725  if ( (__query) != NULL && (__query)->orderby.entries == NULL ) {\
726  (__query)->orderby.entries = (as_ordering *) alloca(__n * sizeof(as_ordering));\
727  if ( (__query)->orderby.entries ) { \
728  (__query)->orderby._free = false;\
729  (__query)->orderby.capacity = __n;\
730  (__query)->orderby.size = 0;\
731  }\
732  }
733 
734 /**
735  * Initializes `as_query.orderby` with a capacity of `n` using `malloc()`.
736  *
737  * For stack allocation, use `as_query_orderby_inita()`.
738  *
739  * ~~~~~~~~~~{.c}
740  * as_query_orderby_init(&query, 1);
741  * as_query_orderby(&query, "bin1", AS_ORDER_ASCENDING);
742  * ~~~~~~~~~~
743  *
744  * @param query The query to initialize.
745  * @param n The number of as_orders to allocate.
746  *
747  * @return On success, true. Otherwise an error occurred.
748  *
749  * @relates as_query
750  */
751 bool as_query_orderby_init(as_query * query, uint16_t n);
752 
753 /**
754  * Add a bin to sort by to the query.
755  *
756  * You have to ensure as_query.orderby has sufficient capacity, prior to
757  * adding an ordering. If capacity is insufficient then false is returned.
758  *
759  * ~~~~~~~~~~{.c}
760  * as_query_orderby_init(&query, 1);
761  * as_query_orderby(&query, "bin1", AS_ORDER_ASCENDING);
762  * ~~~~~~~~~~
763  *
764  * @param query The query to modify.
765  * @param bin The name of the bin to sort by.
766  * @param order The sort order: `AS_ORDER_ASCENDING` or `AS_ORDER_DESCENDING`.
767  *
768  * @return On success, true. Otherwise an error occurred.
769  *
770  * @relates as_query
771  */
772 bool as_query_orderby(as_query * query, const char * bin, as_order order);
773 
774 /******************************************************************************
775  * QUERY MODIFIER FUNCTIONS
776  *****************************************************************************/
777 
778 /**
779  * Apply a function to the results of the query.
780  *
781  * ~~~~~~~~~~{.c}
782  * as_query_apply(&query, "my_module", "my_function", NULL);
783  * ~~~~~~~~~~
784  *
785  * @param query The query to apply the function to.
786  * @param module The module containing the function to invoke.
787  * @param function The function in the module to invoke.
788  * @param arglist The arguments to use when calling the function.
789  *
790  * @return On success, true. Otherwise an error occurred.
791  *
792  * @relates as_query
793  */
794 bool as_query_apply(as_query * query, const char * module, const char * function, const as_list * arglist);
as_namespace ns
Definition: as_scan.h:334
as_query * as_query_init(as_query *query, const as_namespace ns, const as_set set)
as_predicate_type type
Definition: as_query.h:148
as_query * as_query_new(const as_namespace ns, const as_set set)
bool as_query_where(as_query *query, const char *bin, as_predicate_type type,...)
bool as_query_orderby(as_query *query, const char *bin, as_order order)
bool as_query_select(as_query *query, const char *bin)
as_udf_call apply
Definition: as_query.h:495
bool as_query_where_init(as_query *query, uint16_t n)
char as_namespace[AS_NAMESPACE_MAX_SIZE]
Definition: as_key.h:66
void as_query_destroy(as_query *query)
uint16_t capacity
Definition: as_query.h:280
as_predicate * entries
Definition: as_query.h:256
uint16_t size
Definition: as_query.h:217
as_bin_name bin
Definition: as_query.h:183
as_order order
Definition: as_query.h:188
as_query_bins select
Definition: as_query.h:466
as_bin_name bin
Definition: as_query.h:143
uint16_t capacity
Definition: as_query.h:246
as_namespace ns
Definition: as_query.h:446
bool as_query_select_init(as_query *query, uint16_t n)
bool as_query_orderby_init(as_query *query, uint16_t n)
as_bin_name * entries
Definition: as_query.h:222
as_order
Definition: as_query.h:160
uint16_t size
Definition: as_query.h:285
as_set set
Definition: as_query.h:455
bool _free
Definition: as_query.h:437
uint16_t capacity
Definition: as_query.h:212
char as_bin_name[AS_BIN_NAME_MAX_SIZE]
Definition: as_bin.h:53
bool as_query_apply(as_query *query, const char *module, const char *function, const as_list *arglist)
as_predicate_value value
Definition: as_query.h:153
as_query_predicates where
Definition: as_query.h:477
int64_t integer
Definition: as_query.h:88
as_predicate_type
Definition: as_query.h:112
char as_set[AS_SET_MAX_SIZE]
Definition: as_key.h:73
as_query_ordering orderby
Definition: as_query.h:488
as_ordering * entries
Definition: as_query.h:290