On this page
The DocumentResult
object in the Polypheny JDBC Multimodel Extension represent the result of a query in the document model. It is a collection of documents that offers an standard compliant java iterator to access them while the documents are automatically fetched as required in the background.
iterator
public Iterator<PolyDocument> iterator()
Returns a Java-compliant iterator that iterates over PolyDocument
objects contained in the DocumentResult
.
Return Type:
- Returns an iterator over
PolyDocument
objects.
Usage:
Iterator<PolyDocument> documentIterator = documentResult.iterator();
while (documentIterator.hasNext()) {
PolyDocument polyDocument = documentIterator.next();
// Process each PolyDocument object...
}
To iterate over the documents and print each one:
Iterator<PolyDocument> documentIterator = documentResult.iterator();
while (documentIterator.hasNext()) {
PolyDocument polyDocument = documentIterator.next();
System.out.println(polyDocument.toString());
}
© Polypheny GmbH. All Rights Reserved.