Permalink
Browse files

[couch] Added pid view

  • Loading branch information...
1 parent ccda8da commit 57e0e619a7dfeb0f01916f749af68eeec8f11c10 @alejandro alejandro committed Mar 24, 2012
Showing with 20 additions and 1 deletion.
  1. +20 −1 scripts/couchdb/setup_default_views.js
@@ -36,6 +36,13 @@ var all_views = [{
map: function (doc) {
emit(doc.username, doc);
}
+ },
+ pid:{
+ map: function(doc) {
+ if (doc.pid){
+ emit(doc.pid, [doc.repo_id,doc.username,doc._id]);
+ }
+ }
}
}
}, {
@@ -65,7 +72,19 @@ var all_views = [{
}
}
}
-}];
+},
+{
+ table: 'admins',
+ design: 'aliasdomains',
+ views: {
+ all: {
+ map: function (doc) {
+ emit(doc.username, doc);
+ }
+ }
+ }
+}
+];
for (var i in all_views) {
(function (view) {

0 comments on commit 57e0e61

Please sign in to comment.