Description
Reported in https://github.com/couchbase/couchbase-lite-C/issues/297.
MutableDocument mutableDocA = new MutableDocument("test2","{\"names\":[null, 'abc','def', null, 'ghi'],\"ID\":\"test2\"}"); |
database.save(mutableDocA);
|
|
Query query = database.createQuery("SELECT ARRAY_IFNULL(names) AS NONNULL, ARRAY_COUNT(names) AS COUNT, ARRAY_LENGTH(names) AS LENGTH FROM _ WHERE META().id = 'test2'"); |
|
ResultSet rs = query.execute();
|
for (Result result : rs) { |
Log.i(TAG, String.format("TEST JSON: %s", result.toJSON())); |
}
|
Result:
I/CBM: TEST JSON: {"NONNULL":"abc","COUNT":5,"LENGTH":5} |