2015-10-17 51 views

回答

1

您需要使用Queries

如果要检索所有文档(或其ID),可以使用All-documents query

Query query = database.createAllDocumentsQuery(); 

QueryEnumerator result = query.run(); 
for (Iterator<QueryRow> it = result; it.hasNext();) { 
    QueryRow row = it.next(); 
    Log.w("MYAPP", "document ID: %s", row.getDocumentId()); // or QueryRow also has a way to get its source document. 
} 

您可以根据自己的需要编写自己的视图,以后再查询结果。

另请参阅here的数据库中的文档处理方法。事实上,我建议通过整个引导去。