Tracker::CouchDbBackend::arbitBackendCouchDbTrackerIssueView
Class arbitBackendCouchDbTrackerIssueView
View on issue tracker issues View on issue tracker issues
phpillowView
|
--arbitBackendCouchDbTrackerIssueView
Author(s):
|
Version:
|
$Revision: 1595 $ |
|
License:
|
GPL |
Member Variables
|
protected array |
$viewDefinitions
= array( // Add plain view on all users 'issues' => 'function( doc ) { if ( doc.type == "tracker_issue" ) { emit( doc.issue * 1, doc._id ); } }', 'issue_number' => 'function( doc ) { if ( doc.type == "tracker_issue" ) { emit( doc._id, doc.issue * 1 ); } }', 'roadmap' => 'function( doc ) { if ( ( doc.type == "tracker_issue" ) && ( doc.scheduled ) ) { emit( [doc.scheduled, doc.revisions[0]["_date"]], doc._id ); } }', 'affected_users' => 'function( doc ) { if ( doc.type == "tracker_issue" ) { if ( doc.assigned ) { for ( var i = 0; i < doc.assigned.length; ++i ) { emit( doc._id, doc.assigned[i] ); } }
emit( doc._id, doc.author ); for ( var i = 1; i < doc.revisions.length; ++i ) { emit( doc._id, doc.revisions[i].author ); } }
if ( doc.type == "tracker_comment" ) { emit( doc.issue, doc.author ); } }', )
View functions to be registered on the server
View functions to be registered on the server |
|
protected array |
$viewReduces
= array( 'issue_number' => 'function( keys, values ) { var highest = 0; for ( var i = 0; i < values.length; ++i ) { if ( values[i] > highest ) { highest = values[i]; } } return highest; }', )
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.
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
|