|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (7)
View Page History... |
| CouchDbClient client = new DefaultCouchDbClient(); Database database = client.getDatabase("dropzones"); |
| ViewResult byCountry = database.fetchView(new View("dropzone/by_country")); database.fetchView(ViewQuery.builder("dropzone/by_country").build()); |
| for (ViewResultRow row : byCountry) { //System.out.println(row); System.out.println(row.getKey()); JSONArray ary = row.getValueAsArray(); |
| System.out.println(ary); |
| } {code} |
... |
| h2. Value is a document or the query option {{include_docs}} is true |
| |
| {{include_docs=true}} |
... |
| {code} |
| Value contains the document (or at least {{\_id}}): |
| {code} |
... |
| Database database = client.getDatabase(DATABASE); |
| ViewResult byCountry = database.fetchView(new View("test/t1").includeDocs(true)); database.fetchView(ViewQuery.builder("test/t1").includeDocs(true).build()); |
| for (ViewResultRow row : byCountry) { System.out.println(row.getKey()); |
... |
| |
| h2. Value is an a JSON object |
| Map function |
... |
| Database database = client.getDatabase("dropzones"); |
| ViewResult byCountry = database.fetchView(new View("admin/checked_dropzones_test")); database.fetchView(ViewQuery.builder("admin/checked_dropzones_test").build()); |
| for (ViewResultRow row : byCountry) { System.out.println(row.getKey()); |
... |