Wiki::CouchDbBackend::arbitBackendCouchDbWikiPageView
Class arbitBackendCouchDbWikiPageView
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
Methods
getViewName
string
getViewName(
)
Get name of view Get name of view
Get name of view
|