org.polypheny.jdbc.multimodel.DocumentResult is a Result of type DOCUMENT. It implements Iterable<PolyDocument>. Get it by unwrapping a result that contains a Prism document frame. Each PolyDocument holds the fields of one returned document.
iterator
iterator() returns a Java Iterator<PolyDocument>. A for-each loop reads documents in result order. Iteration fetches additional frames as needed and retains fetched documents for repeat iteration. See request timeouts and paging errors for how an iterator reports a fetch failure. Calling next() on an exhausted iterator throws NoSuchElementException.
Keep the originating PolyStatement and its connection available until iteration is complete. The driver builds the result using DocumentResult(Frame, PolyStatement). Applications normally obtain it through execute.
See the runnable MongoQL example for queries and writes. For metadata describing the collection, see document collection metadata.