CouchDb bulk rename -


for example have posts tag names, , decided rename 1 of tags. bulk updating when should know revision not suitable. better if integrated.

check out costco, provides simple interface lets write little function gets applied documents modify them.

you write simple function like:

function (doc) {   // ignore documents without tags   if (!doc.tags) return doc;    (var = 0, len = doc.tags.length; < len; += 1) {     // convert tag misspelled "couch-db" real name "couchdb"     if (doc.tags[i] === "couch-db") doc.tags[i] = "couchdb";   }   return doc; } 

Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -