As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
I've tried to pass a custom query to some API methods but with no success, I'm guessing if there is a workaround...
GenericJson elems = new GenericJson();
elems.put("_id", null);
elems.put("count", "{ $sum: 1 }");
GenericJson sl = new GenericJson();
sl.put("$group", elems);
Query query = new Query();
query.equals(sl);
It should return something like this:
{
"result" : [
{
"_id" : null,
"count" : 5
}
],
"ok" : 1
}
Thanks in advance,
Ruben.
1 Comment
Gal
said
about 9 years ago
Hi Ruben, Kinvey does not currently support the full Mongo aggregation framework. While supporting the aggregation framework in on our roadmap, currently only the methods listed in the guide linked to in your post are available.
Ruben
db.products.aggregate(
[
{ $group: { _id: null, count: { $sum: 1 } } }
]
)
Looks like the documentation has some restrictions when talking about aggregation:
http://devcenter.kinvey.com/android/guides/datastore#aggregation
I've tried to pass a custom query to some API methods but with no success, I'm guessing if there is a workaround...
GenericJson elems = new GenericJson();
elems.put("_id", null);
elems.put("count", "{ $sum: 1 }");
GenericJson sl = new GenericJson();
sl.put("$group", elems);
Query query = new Query();
query.equals(sl);
It should return something like this:
{
"result" : [
{
"_id" : null,
"count" : 5
}
],
"ok" : 1
}
Thanks in advance,
Ruben.