Arbit - project tracking

Arbit - project tracking

API documentation :: Docs For Class arbitBackendCouchDbWikiPageView

Wiki::CouchDbBackend::arbitBackendCouchDbWikiPageView

Class arbitBackendCouchDbWikiPageView

View on Wiki questions

View on Wiki questions

phpillowView
   |
   --arbitBackendCouchDbWikiPageView
Author(s):
Version:   $Revision: 1236 $
License:   GPL

Member Variables

protected array $viewDefinitions = array(
// Index all wiki pages by their titles
'pages' => 'function( doc )
{
if ( doc.type == "wiki_page" )
{
emit( [doc.namespace, doc.title], doc._id );
}
}',
// Index all wiki page by their namespace to get a
// count of pages
'page_count' => 'function( doc )
{
if ( doc.type == "wiki_page" )
{
emit( doc.namespace, 1 );
}
}',
// Index all wiki documents by their last edit date,
// to be able to show the last edits.
'lastEdits' => 'function( doc )
{
if ( doc.type == "wiki_page" &&
doc.edited )
{
emit( [doc.namespace, doc.edited], doc._id );
}
}',
)

View functions to be registered on the server

View functions to be registered on the server

protected array $viewReduces = array(
'page_count' => 'function( keys, values )
{
return values.length;
}',
)

Reduce function for a view function.

Reduce function for a view function. A reduce function may be used to aggregate / reduce the results calculated by a view function. See the CouchDB documentation for more results: @TODO: Not yet documented. Each view reduce function MUST have a view definition with the same name, otherwise there is nothing to reduce.

Method Summary

protected string getViewName( )
Get name of view

Methods

getViewName

string getViewName( )

Get name of view

Get name of view Get name of view

Documentation generated on Mon, 05 Apr 2010 14:02:09 +0200 by phpDocumentor 1.4.3