18 #pragma GCC diagnostic ignored "-Waddress"
40 #define string_equals(__val) AS_PREDICATE_STRING_EQUAL, __val
51 #define integer_equals(__val) AS_PREDICATE_INTEGER_EQUAL, __val
63 #define integer_range(__min, __max) AS_PREDICATE_INTEGER_RANGE, __min, __max
72 typedef union as_predicate_value_u {
106 typedef enum as_predicate_type_e {
132 typedef struct as_predicate_s {
154 typedef enum as_order_e {
172 typedef struct as_ordering_s {
195 typedef struct as_query_bins_s {
229 typedef struct as_query_predicates_s {
263 typedef struct as_query_sort_s {
425 typedef struct as_query_s {
566 #define as_query_select_inita(__query, __n) \
567 if ( (__query) != NULL && (__query)->select.entries == NULL ) {\
568 (__query)->select.entries = (as_bin_name *) alloca(__n * sizeof(as_bin_name));\
569 if ( (__query)->select.entries ) { \
570 (__query)->select._free = false;\
571 (__query)->select.capacity = __n;\
572 (__query)->select.size = 0;\
642 #define as_query_where_inita(__query, __n) \
643 if ( (__query) != NULL && (__query)->where.entries == NULL ) {\
644 (__query)->where.entries = (as_predicate *) alloca(__n * sizeof(as_predicate));\
645 if ( (__query)->where.entries ) { \
646 (__query)->where._free = false;\
647 (__query)->where.capacity = __n;\
648 (__query)->where.size = 0;\
718 #define as_query_orderby_inita(__query, __n) \
719 if ( (__query) != NULL && (__query)->orderby.entries == NULL ) {\
720 (__query)->orderby.entries = (as_ordering *) alloca(__n * sizeof(as_ordering));\
721 if ( (__query)->orderby.entries ) { \
722 (__query)->orderby._free = false;\
723 (__query)->orderby.capacity = __n;\
724 (__query)->orderby.size = 0;\
as_query * as_query_init(as_query *query, const as_namespace ns, const as_set set)
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)
bool as_query_where_init(as_query *query, uint16_t n)
char as_namespace[AS_NAMESPACE_MAX_SIZE]
void as_query_destroy(as_query *query)
bool as_query_select_init(as_query *query, uint16_t n)
bool as_query_orderby_init(as_query *query, uint16_t n)
char as_bin_name[AS_BIN_NAME_MAX_SIZE]
bool as_query_apply(as_query *query, const char *module, const char *function, const as_list *arglist)
as_query_predicates where
char as_set[AS_SET_MAX_SIZE]
as_query_ordering orderby