45 #define string_equals(__val) AS_PREDICATE_STRING_EQUAL, __val
56 #define integer_equals(__val) AS_PREDICATE_INTEGER_EQUAL, __val
68 #define integer_range(__min, __max) AS_PREDICATE_INTEGER_RANGE, __min, __max
77 typedef union as_predicate_value_u {
111 typedef enum as_predicate_type_e {
137 typedef struct as_predicate_s {
159 typedef enum as_order_e {
177 typedef struct as_ordering_s {
200 typedef struct as_query_bins_s {
234 typedef struct as_query_predicates_s {
268 typedef struct as_query_sort_s {
430 typedef struct as_query_s {
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;\
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;\
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;\
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