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

Query Options

Previousn1ql QueriesNextFilter Closures

Last updated 7 years ago

Was this helpful?

Here are some of the most common keys you can pass in the struct of options to control how the query is executed. Please check the for the full list.

Option

Description

sortOrder

Specifies the direction to sort the results based on the map function's "key" value. Valid values are ASC and DESC.

limit

Number of records to return

offset

Number of records to skip when returning

reduce

Flag to control whether the reduce portion of the view is run. If false, only the results of the map function are returned.

includeDocs

Specifies whether or not to include the entire document in the results or just the key names. Default is false.

startkey

Specify the start of a range of keys to return.

endkey

Specify the end of a range of keys to return.

group

Flag to control whether the results of the reduce function are grouped.

keys

An array of keys to return. For complex keys, pass each key as an array.

stale

Specifies if stale data can be returned with the view. Possible values are: OK - (default)stale data is ok, FALSE - force index of view, and UPDATE_AFTER potentially returns stale data, but starts an asynch re-index.

API Docs