Skip to content

Instantly share code, notes, and snippets.

@tleyden
Created December 18, 2013 23:19
Show Gist options
  • Save tleyden/8031592 to your computer and use it in GitHub Desktop.
Save tleyden/8031592 to your computer and use it in GitHub Desktop.
Query for Person objects
Query query = view.createQuery();
QueryEnumerator queryEnumerator = query.run();
while (queryEnumerator.hasNext()) {
QueryRow row = queryEnumerator.next();
Document document = database.getDocument(row.getDocumentId());
Person person = new Person(document);
person.setName(person.getName() + ".");
person.save();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment