CFCouchbase SDK
Search…
Introduction
What's New With 2.2.0
What's New With 2.0.0
About This Book
Authors
Overview
Installation
Configuration
Usage
Storing Documents
Storage Durability
Retrieving Documents
Data Serialization
Components
Custom Transformers
Executing Queries
View Queries
n1ql Queries
Query Options
Filter Closures
Transform Closures
Return Types
Managing Views
Working With Futures
Help & Support
Powered By
GitBook
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!
Previous
Transform Closures
Next
Managing Views
Last modified
4yr ago
Copy link
Edit on GitHub