Return Types
You can ask the query() method to return an array default, a Java ViewReponse object, or a Java iterator. By default we use the native CFML array type which uses transformations, automatic deserializations and inflations.
1
// Get an iterator of Java objects
2
iterator = couchbase.query(
3
designDocumentName = 'beer',
4
viewName = 'brewery_beers',
5
returnType = 'Iterator'
6
);
7
8
while( iterator.hasNex() ) {
9
writeOutput( iterator.getNext().getKey() );
10
}
Copied!
Last modified 3yr ago
Copy link