Hello,
I’m trying to limit the number of results returned by aerospike_query_foreach. My sample code is very similar to the examples shipped with the c client library for ubuntu.
as_query *query; query = malloc(sizeof(as_query)); as_query_init(query, g_namespace, g_set); as_query_select_init(query, 2); as_query_select(query, "stamp"); as_query_select(query, "originalId");
as_query_limit(query, 100); as_query_where_init(query, 1); as_query_where(query, "stamp", integer_range(1, 9999999999));
The as_query_limit() function is documented here: C Client API: Query Operations
and in aerospike_query.h
The version of aerospike c-client library i’m using is: 3.0.87 on Ubuntu, specifically, aerospike-client-c-3.0.87.ubuntu12.04.x86_64
When I compile my program, I get this error: /root/aerospike-units/query/query-performance.c:80: undefined reference to `as_query_limit’
Inspecting libaerospike.a and libaerospike.so for symbols reveal no results:
$ nm /usr/lib/libaerospike.a /usr/lib/libaerospike.so | grep -i as_query_limit $ $ nm /usr/lib/libaerospike.a /usr/lib/libaerospike.so | grep -i query_limit 0000000000001fa2 T cl_query_limit 000000000001afd2 T cl_query_limit
Iis this a bug or on purpose?
Best Regards, Leonidas Tsampros