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