Edit this topic

Couch db content enumerator

: shell

: content-enumerator

: couch-db-content-store

: /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.

CouchContentEnumerator.getItemEnumerator(context) ⇒ function

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

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.

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.