- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1
Functions: Design documents
        Dannes Wessels edited this page Nov 2, 2015 
        ·
        10 revisions
      
    couchbase:list-design-documents($clusterId as xs:string, 
  $bucketname as xs:string?) as xs:string*couchbase:get-design-document($clusterId as xs:string, 
  $bucketname as xs:string?, $design-document-name  as xs:string) as map(*)couchbase:delete-design-document($clusterId as xs:string, 
  $bucketname as xs:string?, $design-document-name  as xs:string) as xs:booleancouchbase:upsert-design-document($clusterId as xs:string, 
  $bucketname as xs:string?, $design-document-name  as xs:string, 
  $designdoc as xs:string) as map(*)couchbase:insert-design-document($clusterId as xs:string, 
  $bucketname as xs:string?, $design-document-name  as xs:string, 
  $designdoc as xs:string) as map(*)example design document:
{
 "views": {
 "byloc": {
 "map": "function (doc, meta) { if (meta.type == \"json\") { emit(doc.city, doc.sales);  } else { emit([\"blob\"]);  } }"
 } } }For an example see the unit tests
