I am attempting to convert from couchbase lite 1.4 to couchbase lite 2.8.1
I seem to be able to create documents but when I try to query them. I get no resultSet. The code is as follows with log messages.
Query query = QueryBuilder.select(SelectResult.expression(Meta.id),SelectResult.all())
.from(DataSource.database(db))
;
ResultSet rs = query.execute();
Log.i"Number of rows :: " + rs.allResults().size());
Iterator it = rs.iterator();
for (Result res :rs){
Log.i( res.getString("type")+ " "+res.getString("name")+" "+res.getString("id"));
}
There is no exception being thrown by the execute
The log messages are
Number of rows :: 27
It never runs through the for loop.
So I added some code before the query to see if I could get documents from the Db.
Database db = getDocMergedDB();
MutableDocument mdoc = new MutableDocument();
mdoc.setString(“type”,“test”);
mdoc.setString(“name”, “milt”);
try {
getDocMergedDB().save(mdoc);
Document doc = db.getDocument(mdoc.getId());
Log.i(doc.getString(“name”)+" "+doc.getString(“type”));
}
This returns the document that I saved.
What am I doing incorrectly. There are no indexes on the table. I have tried this with couchbaselite versions 2.7.0, 2.8.0, and 2.8.1