Query parameters structure definition.
Following options could be specified:
- single (boolean) - return only first matching element.
- count (boolean) - return only the number of matching elements.
- offset (unsigned int) - skip specified number of matching elements before yielding the first result.
- limit (unsigned int) - yield no more than a specified number of matching elements.
- sort (rpc_array_cmp_t) - sort the input array before yielding the results - the sorting function is taking a rpc_array_cmp_t block as an argument to figure out relations between input an array's elements (a > b, a = b, a < b).
- reverse (boolean) - reverse the order of elements of an input array (always done after eventual sorting) - be aware that this operation has to create an intermediate object to store elements in the reversed order, so it might be expensive for large data sets.
- callback (rpc_query_cb_t) - for each of the matching elements run a callback function first - query will return an RPC object returned by a callback function, but will skip it if a callback function returns NULL instead of an RPC object.
- Examples:
- query.c.
Definition at line 101 of file query.h.