Edit this topic

Couch db content enumerator

: shell

: couch-db-content-store

: content-enumerator

: /modules/db/couch/services/couch-db-content-enumerator.js

: https://github.com/DecentCMS/DecentCMS/blob/master/modules/db/couch/services/couch-db-content-enumerator.js


A content enumerator that looks for content stored in a CouchDB database.

Kind: global variable

CouchContentEnumerator.getItemEnumerator(context) ⇒ function

Gets an asynchronous enumerator for all the items in the store.

Kind: static method of CouchContentEnumerator
Returns: function - The function that gets the next item. It takes a callback function as its parameter

Param Type Description
context object The context.
context.scope object The scope.
[context.idFilter] RegExp | string A regular expression that validates content item ids before they are read and indexed.


Looks for the next item in the store.

Kind: inner method of getItemEnumerator

Param Type Description
callback function the function that gets called when the item has been fetched. This function takes an error object and the item as its parameters. When all items have been enumerated, the callback is called without parameters.