CFCouchbase SDK
  • Introduction
  • What's New With 2.2.0
  • What's New With 2.0.0
  • About This Book
  • Authors
  • Overview
  • Installation
    • ColdBox Module
    • Traditional Apps
  • Configuration
    • Settings
    • Structure
    • Summary
  • Usage
    • Storing Documents
    • Storage Durability
    • Retrieving Documents
    • Data Serialization
    • Components
      • Auto Inflation
      • Manual Inflation
      • Custom Serialization
      • Binary
    • 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
On this page

Was this helpful?

Edit on GitHub
Export as PDF
  1. Usage
  2. Executing Queries

Transform Closures

The transform closure will be called in each iteration as we build the native CF array of results. This can be used to normalize data, add or remove data, you name it.

results = couchbase.query(
    designDocumentName = 'beer', 
    viewName = 'brewery_beers', 
    deserialize = false,
    transform = function( row ){
        row.document = deserializeJSON( row.document );
    }
);
PreviousFilter ClosuresNextReturn Types

Last updated 7 years ago

Was this helpful?